ads/google/a4a/google-data-reporter.js
/**
 * Creates or reinitializes a lifecycle reporter for Google ad network
 * implementations.  (I.e., 'type="doubleclick"' and 'type="adsense"'.)  For
 * non-Google networks, returns a BaseLifecycleReporter -- a stub reporter that
 * generates no outputs.
 *
 * @param {!../../../extensions/amp-a4a/0.1/amp-a4a.AmpA4A|!../../../extensions/amp-ad/0.1/amp-ad-3p-impl.AmpAd3PImpl} baseInstance
 * @return {!./performance.BaseLifecycleReporter}
 */
Creates or reinitializes a lifecycle reporter for Google ad network
implementations.    For
non-Google networks, returns a BaseLifecycleReporter -- a stub reporter that
generates no outputs.


Creates or reinitializes a lifecycle reporter for Google ad network implementations . For non - Google networks returns a BaseLifecycleReporter -- a stub reporter that generates no outputs .
function googleLifecycleReporterFactory(baseInstance) {
  const reporter = getLifecycleReporter(
      baseInstance, baseInstance.element.getAttribute('data-amp-slot-index'));
  reporter.setPingParameters({
    's': 'AD_SLOT_NAMESPACE',
    'dt': 'NAV_TIMING(navigationStart)',
    'v': '2',
    'c': 'AD_PAGE_CORRELATOR',
    'rls': 'AMP_VERSION',
    'v_h': 'VIEWPORT_HEIGHT',
    's_t': 'SCROLL_TOP',
    'slotId': 'AD_SLOT_ID',
    'stageName': 'AD_SLOT_EVENT_NAME',
    'stageIdx': 'AD_SLOT_EVENT_ID',
    'met.AD_SLOT_NAMESPACE.AD_SLOT_ID':
        'AD_SLOT_EVENT_NAME.AD_SLOT_TIME_TO_EVENT',
    'e.AD_SLOT_ID': baseInstance.element.getAttribute(EXPERIMENT_ATTRIBUTE),
    'adt.AD_SLOT_ID': baseInstance.element.getAttribute('type'),
    'met.AD_SLOT_NAMESPACE':
        'firstVisibleTime.AD_PAGE_FIRST_VISIBLE_TIME' +
        ',lastVisibleTime.AD_PAGE_LAST_VISIBLE_TIME',
  });
  return reporter;
}
function googleLifecycleReporterFactory ( baseInstance ) { const reporter = getLifecycleReporter ( baseInstance , baseInstance . element . getAttribute ( 'data-amp-slot-index' ) ) ; reporter . setPingParameters ( { 's' : 'AD_SLOT_NAMESPACE' , 'dt' : 'NAV_TIMING(navigationStart)' , 'v' : '2' , 'c' : 'AD_PAGE_CORRELATOR' , 'rls' : 'AMP_VERSION' , 'v_h' : 'VIEWPORT_HEIGHT' , 's_t' : 'SCROLL_TOP' , 'slotId' : 'AD_SLOT_ID' , 'stageName' : 'AD_SLOT_EVENT_NAME' , 'stageIdx' : 'AD_SLOT_EVENT_ID' , 'met.AD_SLOT_NAMESPACE.AD_SLOT_ID' : 'AD_SLOT_EVENT_NAME.AD_SLOT_TIME_TO_EVENT' , 'e.AD_SLOT_ID' : baseInstance . element . getAttribute ( EXPERIMENT_ATTRIBUTE ) , 'adt.AD_SLOT_ID' : baseInstance . element . getAttribute ( 'type' ) , 'met.AD_SLOT_NAMESPACE' : 'firstVisibleTime.AD_PAGE_FIRST_VISIBLE_TIME' + ',lastVisibleTime.AD_PAGE_LAST_VISIBLE_TIME' , } ) ; return reporter ; }
Creates or reinitializes a lifecycle reporter for Google ad network
 implementations.
Creates or reinitializes a lifecycle reporter for Google ad network implementations .
// Page-level visibility times: `firstVisibleTime.T,.lastVisibleTime.T`.