Analytics
2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Remove Google Analytics Tracking Code Script

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to get Google Analytics to track properly on my WordPress website. GA has been showing zero sessions when I know that I have been getting sessions. I ran the Google Tag Assistant and found two problems:

 

1. Two instances of the tracking code, and

2. One of the tags was included in an external script file.

 

This should have caused double tracking in GA, not zero tracking, it seems to me. Why zero?

 

I think I now need to remove the tag that is included in an external script file… but I can’t figure out how to do that. I don’t see it in the theme header. But I see the external script in the code as:

<script src='/google_analytics_auto.js'></script>

 

Can anyone help me figure out how to remove this external script of Google tracking code in WordPress? And do you think that should get my GA tracking to work properly?

 

For your responses, I am not a developer at all, so if you talk in code or developer jargon, I will surely not understand your answer.

 

Thank you very much in advance.

Re: Remove Google Analytics Tracking Code Script

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Hi Miguel,

Can you send the URL of the site you're looking at? If you don't want to that's fine it'll just take a bit longer.

In WordPress, could you please check your plugins and theme options - maybe there's an option or plugin that lets you add GA via the interface there hence why you can't find it in the templates.

Ali

Re: Remove Google Analytics Tracking Code Script

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you, Ali. It is http://theroguescene.com/. I was afraid that it was uncool to post your website link on here - wasn't sure.

 

I did look through all of the plugins several times to figure out which one may be causing the script version of the GA tracking code. I removed tracking code UA numbers from these two SEO plugins: All-in-One SEO, and Squirrly. I have another plugin just called "Google Analytics" and I did leave that activated and with the UA- tracking code in there because this one seemed to be properly placed within the head tag.

 

I should add that the script issue appears to be on line 202 of the code in Chrome. On line 154 is where I see the good (I think) code placed by the "Google Analytics" plugin.

 

Thank you.

Re: Remove Google Analytics Tracking Code Script

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
Hi Miguel,

I still see Google Analytics being fired from All In One SEO.

What you could do, to diagnose, is deactivate any and all plugins that may be using GA and also make sure to check your Them Options to see if your theme has an option to add GA.

Ali

Re: Remove Google Analytics Tracking Code Script

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Thank you. Progress, but not solved yet. You were right about All-in-One plugin causing that script version of the tracking code. I was reluctant to deactivate that because I'd done a bit of SEO work in that plugin. But I deactivated it and that script version of the tracking code went away. Great.

 

Then I ran the Google Tag Assistant again and I still get these issues:

1. Same web property ID is tracked twice

2. Non-standard implementation.

Re: Remove Google Analytics Tracking Code Script

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆

Hey,

 

Yes I still see two instances.

 

Please disable all those plugins again (so I can see it with those disabled) and also can you check up on the Eventory theme options because I think that might be where the other script is.

 

Ali

Re: Remove Google Analytics Tracking Code Script

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

I deactivated the "Google Analytics" plugin now. I didn't deactivate the Squirrly plugin yet. Will I lose my data that I have input into that if I deactivate it? I have quite a bit of work stored in that one. Thank you.

Re: Remove Google Analytics Tracking Code Script

Explorer ✭ ✭ ☆
# 8
Explorer ✭ ✭ ☆
I only see one now and it's the external one Smiley Surprised

What are your Google Analytics settings in Eventory?

Re: Remove Google Analytics Tracking Code Script

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

I should have also said that I did check my theme options before starting this thread and I did remove the GA tracking code from there.

Re: Remove Google Analytics Tracking Code Script

Explorer ✭ ✭ ☆
# 10
Explorer ✭ ✭ ☆
So now that we have that down to one instance, you still don't have sessions appearing in Google Analytics?