Tecnichal stuff.

AMP is Cool and Fast!

Track AMP pages with Linkpulse

During our years with Linkpulse in the news publishing world, we have often seen publishers underestimating the value of reducing the page loading/rendering speed factor.

The AMP project (Accelerated Mobile Pages Project) is a great initiative that we developers at Linkpulse embrace and welcome. Finally a project focusing on page speed without going outside of the boundaries of HTML world.
For more information about AMP please refer to : AMP project site.

AMP analytics

Linkpulse is part of the AMP project and has submitted our code as an AMP analytics vendor. Therefor Linkpulse can be used directly on every AMP pages via the <amp-analytics> extension with type name 'linkpulse'.

code

Minimal AMP implementation code needed to track AMP pages with Linkpulse
Remember to replace "aabbcceedd00000000000000" with your Linkpulse id.


  <amp-analytics type="linkpulse">
    <script type="application/json">
       {
         "vars": {
                 "id":"aabbcceedd00000000000000"
          }
       }
    </script>
  </amp-analytics>
        

Which actions can be logged via amp-anaytics on Linkpulse?

Currently Linkpulse can track these actions out of the box:

  • Pageviews
  • Pageload
  • Unique users (with ping)
In next update of our AMP code we plan to support these actions as well:
  • Clicks
  • User engage (InScreen, Scroll etc.)
  • Custom Log

Advanced AMP + Linkpulse setup

To enrich your Linkpulse data, you might want to add a few extra metafields. This can be done by populating variables in the amp-analytics config.

code

Custom example
Remember to replace "aabbcceedd00000000000000" with your Linkpulse id.


  <amp-analytics type="linkpulse">
    <script type="application/json">
       {
         "vars": {
                 "id":"aabbcceedd00000000000000",
                 'pageUrl': 'http://www.linkpulse.com',
                 'title'  : 'Linkpulse is the name!',
                 'section': 'front',
                 'channel': 'amp',
                 'type'   : 'frontpage'
          }
       }
    </script>
  </amp-analytics>
        

Linkpulse AMP anaytics vars

config var name Type Description
id string [a-z0-9] Your Linkpulse installation id mandatory
title string Title for your pageUrl optional
pageUrl string Allows to overide the url with give pageUrl value. optional
type string Url type, eg. frontpage, article, sectionpage optional
section string Which section this url is assosiated with, ie: sport, news, etc.. optional
channel string Which channel should AMP traffic be logged as, default: amp optional