• Resolved ghezzicharlye

    (@ghezzicharlye)


    I tried to activate the function in AMP for googleanalytics, but there is nothing to do, from an error in the JSON code entry form
    …. the system answer….. Unexpected token < in Json 0

    are hours that I try everything … does not work

    ———————————————————
    <script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script&gt;
    <amp-analytics type=”gtag” data-credentials=”include”>
    <script type=”application/json”>
    {
    “vars” : {
    “gtag_id”: “<GA_MEASUREMENT_ID>”,
    “config” : {
    “<GA_MEASUREMENT_ID>”: { “groups”: “default” }
    }
    }
    }
    </script>
    </amp-analytics>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Do not include the <script> tags. Only include the part starting from { and ending with }

    Hello, I’m trying to add analytics on our AMP too. My website is https://www.lifeadvancer.com if you want please check the google analytics code on one of our articles.

    the code seems fine, but still can’t see visitors or even my visits. No HTML in the box, cache cleaned. Any ideaS??

    Plugin Author Weston Ruter

    (@westonruter)

    @lifeadvancer I don’t see AMP being used on your site. Please open a new support topic and provide the URL to an AMP page that has <amp-analytics> present.

    Hi there Weston….. It really took so long, and we decided to disable AMP again.

    I m really sorry 🙁 but we couldn’t make it work.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘impossible activate AMP – Json googleanalytics’ is closed to new replies.