Google Analytics not connecting to Google's Dashboard

Have issues with getting Google Analytics to work on my clients site (https://jkmurphyadvisors.com/) It used to connect to the RTA, but now it doesn’t. I first had the code directly in my header.php of my child theme, and then I used the X plugin for GA and pasted this:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
 
  gtag('config', 'UA-44897617-1');
</script>

That didn’t seem to work either. What’s going on here?

Hi there,

The code you have added seems to be correct. The only thing I can think of is the version of the Google Analytics plugin. Kindly make sure that you use the latest version:

Another point that I see is that there is a Javascript Error on your website that might probably cause the issue for tracking the page.

Kindly go to X > Launch > Options > JS and remove the <scrtip> and </scrtip> tags from the code you have added. You should not add the script tag there.

In contrary, the Google Analytics code inside the plugin you need to add the script tag which you already did.

Than you.

I checked and the GA plugin is currently at 1.0.3. I then deleted the extra tag and even re-pasted the GA code and then I did a Real Time test and still no traffic coming in.

Let me add I just deactivated all plugins (except for the GA plugin) and then switched to the base X theme instead of the Child. No change.

Hi,

In that case, would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password

All the best!

I just sent the secure note. Can you confirm you can see it and login successfully?

Hello There,

I have successfully logged in to your site. I found out that Sucuri Firewal is rejecting the Google Script which is why it is not displaying in your dashboard. Please white list Google analytics code from your Sucuri settings so that this will work.

Hope this helps. Kindly let us know.

Ah…interesting! Never thought of that. Thanks. I’ll get into the Sucuri Dashboard and whitelist that immediately.

You’re welcome!
We’re glad we were able to help you out.

Well, hang on a moment…

So I went to Sucuri, and they said it had nothing to do with the Firewall. So they said it was the cache. So I turned caching off on Sucuri and deactivated the WP Fastest Cache plugin.

No change.

And to top it off, I moved the gtag code to the footer, realizing this isn’t the right place, and it still doesn’t see it! I used Google’s Tag Assistant extension and it told me to add Google Analytics, even though I already did it!

Hi,

Can you try this third party plugin

You can check the link below for your guide on how to use it.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.