amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

🐞[story ads] Analytics pings on story ad pages

Open calebcordry opened this issue 5 years ago • 7 comments

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

  1. Don't fire the story-page-visible trigger when the page is an ad
  2. Send something like isAd=true along 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

calebcordry avatar Apr 12 '21 22:04 calebcordry

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?

Enriqe avatar Apr 13 '21 15:04 Enriqe

+1 to Enrique's approach to handle this. @calebcordry @gmajoulet does that work from your perspectives?

raovs avatar Apr 13 '21 16:04 raovs

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.

rishnarang avatar Apr 13 '21 16:04 rishnarang

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

calebcordry avatar Apr 13 '21 16:04 calebcordry

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.

rishnarang avatar Apr 13 '21 19:04 rishnarang

Agree with Rishab, lets first exclude ads from story-page-visible and I can make a separate issue to discuss adding ads triggers.

calebcordry avatar Apr 13 '21 20:04 calebcordry

I'm a bit late to the party, but Enrique's plan SGTM as well

gmajoulet avatar Apr 16 '21 19:04 gmajoulet