• Resolved joaocarlos

    (@joaocarlos)


    Analytics does not register users

    It registers if at the end of the URL I put /?amp/

    If I use the only /?amp I will not record the visit.

    I followed all the indications of the plugin and inserted the following code

    {
    “vars” : {
    “gtag_id”: “<GA_TRACKING_ID>”,
    “config” : {
    “<GA_TRACKING_ID>”: { “groups”: “default” }
    }
    }
    }

    Where am I going wrong?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi @joaocarlos!

    Please note that if you append /?amp/ to the URL, e.g. https://www.orientacoesmedicas.com.br/medicina-familia-comunidade/?amp/, this will not be the AMP version of your site. Only ?amp without the trailing slash is correct, e.g. https://www.orientacoesmedicas.com.br/medicina-familia-comunidade/?amp.

    As for your AMP Analytics configuration, it looks like you are using the wrong type in the analytics settings. The type should be just “googleanalytics”. However, at the moment you seem to be using “gtaganalyticsamp” as the type, which is incorrect.

    Some documentation for reference:

    * https://developers.google.com/analytics/devguides/collection/amp-analytics/
    * https://amp-wp.org/documentation/playbooks/analytics/

    Besides that, I see that you are currently suing the “CAOS: Complete Analytics Optimization Suite” plugin on your site, which might affect Google Analytics configuration as well. Please try to deactivate this plugin temporarily if you continue to have problems with analytics.

    Thread Starter joaocarlos

    (@joaocarlos)

    Hi pascal

    Thanks for your help, first of all.

    I made all the changes you indicated.

    The source code seems to be correct, see:

    <amp-analytics id=”3637a14b19c0″ type=”googleanalytics”><script type=”application/json”>{“vars”:{“gtag_id”:”UA-XXXXXX-2″,”config”:{“UA-XXXXXX-2”:{“groups”:”default”}}}}</script></amp-analytics>

    However, Google Analytics does not track the visit.

    I cleaned the cache and the CDN.

    And again, there is only record in Analytics if I put the /?amp/ parameter at the end of the URL.

    And the Analytics dashboard displays the URL followed by /?amp/=

    Is there another option for entering the Analytics code? For example functions.php

    Thanks.

    Thread Starter joaocarlos

    (@joaocarlos)

    Problem solved.

    I was using different id.

    Thanks for the quick help.

    Great team work with this plugin !!!

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