Problems with Google Analytics Tracking

6 replies
  • SEO
  • |
Hello,

I'm having some trouble tracking my data via Google Analytics on my WordPress site.

Now i've installed the tracking code in the header of the page as i always do, it's been working fine and tracking the traffic, but suddenly since last week it stopped working for some unknown reason, when i access the site and i try to see "Active users now" to see if i'm being detected i don't get any.

Here is my code, did i miss anything ? Does anyone have any idea why ? Also i'm having some new errors in my console.

Any help on this matter would be much appreciated. Thanks !



<!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UX-XXXXXXX-1"></script>

<script>

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());



gtag('config', 'UX-XXXXXXX-1');

</script>
#analytics #google #problems #tracking
Avatar of Unregistered
  • Profile picture of the author Viki Fran
    What changes on the site preceded this problem?
    {{ DiscussionBoard.errors[11574956].message }}
    • Profile picture of the author kurosaki4d
      Thank you for your reply!

      The only thing i did is a added a few functions in the file "functions.php" and i unloaded a few plugins with a caching plugin.

      I even tried adding the tracking code through a theme feature, and it didn't work either.

      Will it help if i showed the console error messages?
      {{ DiscussionBoard.errors[11575662].message }}
      • Profile picture of the author Viki Fran
        Show console error messages, I will try to help you.
        {{ DiscussionBoard.errors[11577078].message }}
  • Profile picture of the author Morsalin Apon
    I dont have any problem with the tracking but i want to know about the (Life Time Value) Can any one explain me how its works...
    {{ DiscussionBoard.errors[11589218].message }}
  • Profile picture of the author nonin
    .. let us start with basics: have you done test from your G Analytics dashboard?

    .. just in a case: here is how you do that in 3 simple steps:

    1) location:


    ---

    2) press this button:


    ---

    3) your results should be something like this:


    ----

    sorted?

    (based on my experience) usually the problems are caused by too many plugins or G analytics code 2, 3 or even more times
    Signature
    Shared Hosting & Dedicated Servers HostMaria ||| 22-24 Aug Domain Summit in London
    {{ DiscussionBoard.errors[11589477].message }}
  • Profile picture of the author nonin
    Then, if you still have issues:

    1) remove everything you have done manually

    2) Add a plugin like this https://wordpress.org/plugins/addfunc-head-footer-code/ or similar

    3) Copy/paste your G analytics code into a field "site-wide head code" (similar names in most plugins providing the same functional)

    do not invent the bicycle
    Signature
    Shared Hosting & Dedicated Servers HostMaria ||| 22-24 Aug Domain Summit in London
    {{ DiscussionBoard.errors[11589479].message }}
Avatar of Unregistered

Trending Topics