amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

A4A: Add additional CSI pings

Open dvoytenko opened this issue 9 years ago • 8 comments

(Setting highest priority to ensure this makes the next canary)

We'd like additional pings to thoroughly investigate and understand all phases of embed instrumentation. I'd like these pings for both FIE and XOrigin cases (fast vs delayed).

Additional pings I'd like are:

  1. Immediate 1% visibility ping regardless loading state: {on: visible, visibilitySpec: {visiblePercentageMin: 1, waitFor: none}}.
  2. Immediate 1% visibility ping right after ini-load: {on: visible, visibilitySpec: {visiblePercentageMin: 1, waitFor: ini-load}}
  3. Standard visibility filter that we apply as active view (50% + 1s?)
  4. Possibly another like-standard, but for smaller %.

Among other things, I'd like to be able to estimate percentiles of "blank time" - the time between (1) and (2). That could give us insight if ini-load requirement is too aggressive and if it compares well with delayed case.

dvoytenko avatar Apr 14 '17 21:04 dvoytenko

The sample of how to use the visibility API can be found here. It's somewhat manual, but also pretty extensible.

dvoytenko avatar Apr 14 '17 23:04 dvoytenko

Re-assigning to @bradfrizzell. The requirements are for Fast Fetch AdSense and Doubleclick we need to generate CSI beacons for the following. The idea is to use these in comparison with our AMP Analytics based CSI pings to determine possible causes of signal loss. As such, we should make sure we can easily compare across the two different methods and that pings exist for both methods of generation (CSI and AMP analytics). This is a full list of pings:

  • first visible
  • ini-load
  • load
  • 50% visibility w/o ini load
  • 50% visibility w/ ini load
  • 50% visibility w/ini load and 1 second (matches AV definition)

All to be based on AMP ad element.

@dvoytenko - is there a way we could generate pings based on iframe (load and position on screen) as opposed to enclosing AMP ad element? This would be closer to Delayed Fetch parity.

keithwrightbos avatar Apr 17 '17 14:04 keithwrightbos

cc @glevitzky

bradfrizzell avatar Apr 17 '17 14:04 bradfrizzell

@keithwrightbos No way to do this for iframe at this time reliably. But it'd be better if we were to do a reverse - used the same APIs against amp-ad for delayed case as well.

dvoytenko avatar Apr 17 '17 15:04 dvoytenko

Meaning somehow have delayed fetch visibility integration get load of the amp ad element? Given its outside of the creative frame, how would we do that?

keithwrightbos avatar Apr 18 '17 19:04 keithwrightbos

Basically, I'm asking we do the exact same thing for both: FIE and XOrigin. Just as we do for renderStart.

dvoytenko avatar Apr 18 '17 19:04 dvoytenko

sure that works for me

keithwrightbos avatar Apr 18 '17 20:04 keithwrightbos

Fixed by #8796.

jridgewell avatar Apr 20 '17 23:04 jridgewell