You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume during first layout, test-ele takes 2s to ini-load, then it's visible for 3sec. Then user switch to another page in viewer carousel. When user comes back to this page, the test-ele will be laid out again, where this time it will take another 2s to ini-load. Analytics however will have no idea that the test-ele is re layout and take the 2sec into account for total visible time.
Inserted analytics elements by A4A however will stop tracking once element has been unlaid out (will create another analytics element next time) due to here
Which kind of behavior is desired? When an element relayout does it make sense to continue tracking visibility/signals? If so how we deal with the signals?
The text was updated successfully, but these errors were encountered:
zhouyx
changed the title
Make sure inserted analytics behave correctly when parent element reload.
Make sure analytics behave correctly when parent element reload.
May 1, 2017
As discussed with @zhouyx and @lannka . We decided to reset analytics in cases where the unlayout happens. The two cases we know are:
when user swipes between documents and goes back to the original document - this happens rarely and resetting analytics in this case shouldn't impact metrics by a lot
AMP ad refresh case - since ads ship their own analytics in the A4A case, this case is fine. (and in the non-A4A case - ads have their own way of collecting metrics using JS). The one case that might not be handled is when a publisher is trying to do ad related analytics measurement as a parent but the chances of this happening are very few in combined with the ad un layout scenario.
So:
We will ignore the publisher inserting analytics element case since it happens very rarely.
Analytics in FIE: FIE won't be destroyed during unlayoutCallback and there's no new ad request, thus it makes sense to keep the analytics element inside FIE as well.
Analytics inserted by ad. If not using FIE, we will remove inserted analytics element during unlayoutCallback and re-insert them again if needed.
Analytics have no idea on other elements' reload.
For example a config like this
Assume during first layout, test-ele takes 2s to ini-load, then it's visible for 3sec. Then user switch to another page in viewer carousel. When user comes back to this page, the test-ele will be laid out again, where this time it will take another 2s to ini-load. Analytics however will have no idea that the test-ele is re layout and take the 2sec into account for total visible time.
Inserted analytics elements by A4A however will stop tracking once element has been unlaid out (will create another analytics element next time) due to here
Which kind of behavior is desired? When an element relayout does it make sense to continue tracking visibility/signals? If so how we deal with the signals?
The text was updated successfully, but these errors were encountered: