Viewing 2 replies - 1 through 2 (of 2 total)
  • I can’t add my Analytics’ code either. How can we do it?
    Thanks in advenced!

    I implemented via custom amp template. More info on that here.

    Add to your head:
    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

    And right after your opening body tag:

    <amp-analytics type="googleanalytics">
                    <script type="application/json">
                    {
                    "vars": {
                            "account": "YOUR_TRACKING_ID"
                    },
                    "triggers": {
                            "trackPageview": {
                            "on": "visible",
                            "request": "pageview"
                            }
                    }
                    }
                    </script>
            </amp-analytics>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Analytics’ is closed to new replies.