🐞[story ads] Analytics pings on story ad pages
If a pub uses story analytics with a story-page-visible trigger an ad page will send this ping with the same page index as the page before the ad, leading to what appears to be more page views at pages 7 & 14 (or wherever we start placing the ads).
This includes pubs using analytics through auto analytics.
I think there are two options
- Don't fire the
story-page-visibletrigger when the page is an ad - Send something like
isAd=truealong with the trigger
I would lean towards (2) as people would likely want to keep track of when this happens and can lead to slicing into ad specific metrics in e.g. GA
Repro on any page using ads + story auto analytics e.g. https://www.inputmag.com/style/how-to-dress-look-like-lil-nas-x-under-100/amp
to/ @ampproject/wg-stories for discussion cc/ @ampproject/wg-monetization
Thanks for the report @calebcordry. Sending a ping with the same index as the page before definitely sounds like something we should fix. My recommendation would be to do (1) and have a separate story-ad-page trigger, along with a storyPageId/Index that identifies the different ads inside a story.
Doing (2) without (1) will be very confusing for people watching metrics - they won't understand what's happening unless they dive into the documentation (which rarely happens). We should try to keep metrics as clear as possible.
@gmajoulet WDYT?
+1 to Enrique's approach to handle this. @calebcordry @gmajoulet does that work from your perspectives?
Enrique's approach makes a lot of sense.
We should send 'story-ad-page-viewed' (along with story-page-index) and not send a 'story-pages-viewed' event when an ad is shown.
Ok I think if we add ad pings to auto analytics another way excluding ad pages from story-page-visible sgtm. We already have some ad specific triggers and vars that should help https://github.com/ampproject/amphtml/blob/main/extensions/amp-story-auto-ads/amp-story-auto-ads.md#triggers
Should we make the ads part of the auto analytics opt in (e.g. <amp-story-auto-analytics ads=true ..) We could also add some of the other events like clicks views etc
For starters, if we could remove a ping with the same index as the page for ads, that would be great. For the longer term, +1 for adding more ad related triggers to amp-story-auto-analytics.
Agree with Rishab, lets first exclude ads from story-page-visible and I can make a separate issue to discuss adding ads triggers.
I'm a bit late to the party, but Enrique's plan SGTM as well