• Resolved stevemayall

    (@stevemayall)


    Hi I have just installed the plugin created a new property in GA

    I’ve added this code to the analytics field, but when i click save it dissappers (I have modified this code to include my GA code)

    <amp-analytics type=”googleanalytics”>
    <script type=”application/json”>
    {
    “vars”: {
    “account”: “UA-XXXXX-Y” – Replace this with your tracking code
    },
    “triggers”: {
    “trackPageview”: {
    “on”: “visible”,
    “request”: “pageview”
    }
    }
    }
    </script>
    </amp-analytics>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jip Moors

    (@jipmoors)

    Hi @stevemayall

    It appears that you are entering too much information into the field.
    If you leave out the <amp-analytics> and <script> tags it should be saved and used as expected.

    Edit: this is not correct

    • This reply was modified 6 years, 9 months ago by Jip Moors.

    I tried right now with but is empty also with that.

    Checking on debug info:

    array(23) {
      ["version"]=>
      int(1)
      ["amp_site_icon"]=>
      string(0) ""
      ["default_image"]=>
      string(0) ""
      ["header-color"]=>
      string(0) ""
      ["headings-color"]=>
      string(0) ""
      ["text-color"]=>
      string(0) ""
      ["meta-color"]=>
      string(0) ""
      ["link-color"]=>
      string(0) ""
      ["link-color-hover"]=>
      string(0) ""
      ["underline"]=>
      string(9) "underline"
      ["blockquote-text-color"]=>
      string(0) ""
      ["blockquote-bg-color"]=>
      string(0) ""
      ["blockquote-border-color"]=>
      string(0) ""
      ["extra-css"]=>
      string(0) ""
      ["extra-head"]=>
      string(0) ""
      ["analytics-extra"]=>
      string(0) ""
      ["post_types-post-amp"]=>
      string(2) "on"
      ["post_types-attachment-amp"]=>
      string(3) "off"
      ["post_types-glossary-amp"]=>
      string(3) "off"
      ["post_types-domande-frequenti-amp"]=>
      string(3) "off"
      ["post_types-deals-amp"]=>
      string(3) "off"
      ["post_types-macchine-amp"]=>
      string(3) "off"
      ["post_types-page-amp"]=>
      string(3) "off"
    }

    Seems that doesn’t care about everything is inserted. Maybe add also a little bit of description what the plugin expect in this field will be not bad, because I tried everything.

    Plugin Author Jip Moors

    (@jipmoors)

    We have been able to resolve this problem on slack.
    The main problem appeared to be the quotes being in a wrong format.

    The quotes on the tags need to be in plain format.

    I’ve changed the quotes to plain format – (by putting into Notepad++) and removing the italicisation on the quotes. This makes it stick in the Yoast SEO AMP analytics section, but it’s still not showing any AMP traffic. Any further suggestions?

    <amp-analytics type=”googleanalytics”>
    <script type=”application/json”>
    {
    “vars”: {
    “account”: “UA-cxxxxx-x”
    },
    “trigger”: {
    “trackPageview”: {
    “on”: “visible”,
    “request”: “pageview”
    }
    }
    }
    </script>
    </amp-analytics>

    • This reply was modified 6 years, 9 months ago by ASocialNomad.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Analytics tracking code not showing in SEO/AMP/Analytics’ is closed to new replies.