Site logo

Archived topic

Google Analytics Not Working

7 replies · Started by Lindsay on July 27, 2022

Viewing posts 1–8 of 8

I’m having a problem with my site and Google Analytics. Google Analytics only shows my admin visits and nothing else.

I can’t tell if the problem started with GP or with Autoptimize. It appears my Google Analytics plummeted back in 2021 when I switched my site to GP and started using Autoptimize. Google Search Console seems to be tracking visits and such, but Analytics only tracks my personal admin page visits.

I stepped away from my site for several months and am just realizing this now.

I believe it was originally set up with a plugin (Insert Headers and Footers). Just today I tried to manually add it to the Theme Header and I don't know if that helped or hurt my situation.

I am not techy at all and need any help I can get please.

https://aheartforallstudents.com/

Can anyone help me figure out this problem? Been wracking my brain to figure this out for weeks now.

Thank you!

Lindsay

Hi Lindsay,

That’s unusual. How did you add you Global Site Tag exactly?

Viewing your site as a “guest” I can see the script from my end.

Side note: You can add it through a Hook Element hooked to wp_head.

Let us know.

Fernando,

I appreciate you getting back to me.

Like I said, I just added the global site tag (within the past few hours) to the theme header section.

However, it is also set up in the Insert Headers and Footers plugin (in the header section). And it was that one that hasn't been tracking for about a year now. (Long story as to why I just noticed.) To clarify, the site tag was orignally set up in the Insert Headers and Footers plugin section.

Any thoughts?

Thank you again,

Lindsay

Before I do this, can you show me how to set up the analytics code into a hook element?

As far as display rules, priority, all the misc options to enable? As if I'm in kindergarten?

Thank you. I've removed the code from the plugin, and the theme header area. I'm trying to add it as a hook, and so far, nothing is being tracked. I'd like to know I've set it up properly in GP before I reach out to them.

I've also disabled Autoptomize to see if that would help. Nope.

Thank you so much.

Alright. Here’s a step-by-step.

1. Create a new Hook Element in Appearance > Elements.
2. Copy the Global site tag code from the tracking code section in you Google Analytics account. Paste it in the text field in the Hook Element.
3. Set the hook to wp_head in the settings sections.
4. In the Display Rules section, set the location to Entire site.
5. Hit publish.

Hope this helps!

Hi Fernando,

I want to give you an update. I ended up deactivating my plugins one by one. Guess which one was messing with Google Analytics? Complianz: GDPR. As soon as I deactivated it, my google analytics started working in Realtime.

Now that we know that it's the problem. Does that mean I can't use it at all or is there a way to configure Complianz to work with GA?

Thank you for any insight!

Lindsay

This archived topic is closed to new replies.