How to track Google AMP, FB Instant Articles?

Avatar

Avatar

psvlin

Avatar

psvlin

psvlin

04-02-2016

Is anyone being asked to track content served through FB Instant Articles or the soon-to-be released Google AMP? FB IA seems easier to track with AA, but Google AMP doesn't. Looks like it removes any third-party tags like Adobe Analytics, but may allow only Google Analytics (of course). 

View Entire Topic

Avatar

Avatar

JillsMatthew

Avatar

JillsMatthew

JillsMatthew

08-02-2016

Hi Victor,

FBIA tracking is straight forward. You can place your tracking code within an iframe in <figure class="op-tracker"> tag

<figure class="op-tracker"><iframe><!-- Include full analytics code here --></iframe></figure>

 

For AMP pages - we are also trying to find the best way to implement Omniture tracking. But nothing is confirmed by Adobe yet. 

You can try including Omniture code in your AMP documents using either <amp-pixel> or <amp-analytics> tags. Your tracking server must be secure server (https).
However this might create duplicate unique visitors in your report because AMP does not use/share any cookies. So if any user view an AMP page and then from there move to a non-AMP page they might be tracked as two different visitors

 

<amp-pixel> example:
<amp-pixel src="https://trackingserver.com/b/ss/rsid/RANDOM?c1=prop1Value&c2=prop2Value&......"></amp-pixel>
 

<amp-analytics> example:

<amp-analytics>
      <script type="application/json">
      {
        "requests": {
          "om-server"       : "https://trackingserver.com/b/ss/rsid/${random}?", // om-server is a custom request name
          "om-tracking"   : "${om-server}c1=${prop1}&c2=${prop2}&...." // om-tracking is a custom request name. ${xxxxx} will take the value of xxxxx from vars list given below
        },
        "vars": { 
          "prop1"       : "prop1Value", // include your custom values here
          "prop2"      : "prop2Value"
        },
        "triggers": {
          "om-view": { // A view name of your choice
            "on": "visible", // Must be visible (for page views) or event (for custom link tracking)
           "request": "om-tracking" (The custom request name to fire. This name must be defined in 'requests' above
          }
        }
      }
      </script>
    </amp-analytics>

 

Let us know if you find a more reliable way to track AMP pages