AMP or Accelerated Mobile Pages is a project by Google designed to help eliminate slow, clunky and frustrating mobile web experience.
AMP uses a different markup for certain things, one of which is adding Google Analytics to your page.

Firstly, we’ll need to add the amp-analytics component library to your web page. The following code goes in between the <head></head>:

<script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script>

Afterwards, you can add the component to your web page:

 <amp-analytics type=”googleanalytics”>
<script type=”application/json”>
{
  “vars”: {
    “account”: “UA-YYYY-Y” 
  },
  “triggers”: {
    “defaultPageview”: {
      “on”: “visible”,
      “request”: “pageview”,
      “vars”: {
        “title”: “Name of the Article”
      }
    }
  }
}
</script>
</amp-analytics>

In the above code, make sure you change your account tracking ID on line five (5).