• Hi,

    I use Google Analytics with Google Tag Manager.
    Both use a special code for AMP that is currently not complete on your AMP plugin.
    According to google documentation for a complete AMP analytics you need these codes in AMP pages:

    at the end of the <head> tag: (This is correct!)
    <!– AMP Analytics –><script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script&gt;

    Additionally to get Tag Manager to work you need this at the beginning of the <body> tag:

    <amp-analytics config=”https://www.googletagmanager.com/amp.json?id=GTM-MFTBG83&gtm.url=SOURCE_URL&#8221; data-credentials=”include”></amp-analytics>

    Is it possible to implement the last code the in the settings like with the Analytics ID but now additionally with the Google Tag manager ID like this: GTM-MFTBG83

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rsavijn

    (@rsavijn)

    @mohammed_kaludi

    Instead of adding support for al sorts of analytics can you add:
    GTM (Google Tag Manager) within GTM and the AMP container you can add all Analytics without having to change any code. Including Clicky etc…

    Here is a detailed blog post what to include..
    Load the JSON configuration object as an external resource
    https://www.simoahava.com/analytics/accelerated-mobile-pages-via-google-tag-manager/

    If you can include it in your plugin or write a tutorial so I can do it myself it would be really helpfull…

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @rsavijn,

    We are very much sorry for the delayed response.

    And thank you for your valuable feedback.

    We are working on it and it will be released soon.(ref)

    Regards,
    Team AMP

    Plugin Author Mohammed Kaludi

    (@mohammed_kaludi)

    Hey @rsavijn,

    We have added Google Tag Manager support in the AMP plugin, please download the latest version of the plugin and do let us know your feedback.

    Thank you for your suggestions,
    Mohammed Kaludi

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AMP Analytics’ is closed to new replies.