Optimize
2.8K members online now
2.8K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

How to setup Optimize Snippet to AMP powered website?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Currently my website is using AMP. I'm using amp-analytics like the following. How can I setup Optimize snippet in this case.

 

<amp-analytics type="googleanalytics">
  <script type="application/json">
    {
      "vars": {
        "account": "UA-xxxxxxxx-x"
      },
      "triggers": {
        "default pageview": {
          "on": "visible",
          "request": "pageview",
          "vars": {
            "title": "{{title}}"
          }
        }
      }
    }
  </script>
</amp-analytics>