Analytics
6.1K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I just added Google Tags Assistant & when I ran it, I got the report "Missing analytics.js script"

 

The thing is, when I set up analytics, I copied & pasted the code exactly in the space the theme provided (I'm using Wordpress), and when I look, I still see the line:

 

(window,document,'script','//www.google-analytics.com/analytics.js','ga')

 

present. Analytics is running as far as I can tell, but--am I missing something here?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Fangirl N
August 2016

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Top Contributor
# 9
Top Contributor
Hi,

Thanks for sharing your site URL. The problem is caused by CoudFlare's Rocket Loader. It affects how javascript resources are loaded. In automatic mode all scripts are affected so you'll need to add 'data-cfasync="false"' to your GA script tag. Please find more information on the link below:
https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-sc...
Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Top Contributor
# 2
Top Contributor
Hi,

It seems that the theme improperly inserts the tracking code, or there is another javascript resource that breaks it. What theme are you using?

Please let me know.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I'm using "Best" by My Theme Shop. It does have the oddity of putting Google Analytics in the Footer code:

Footer Code
Enter the codes which you need to place in your footer. (ex: Google Analytics, Clicky, STATCOUNTER, Woopra, Histats, etc.).

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Top Contributor
# 4
Top Contributor
Is there a "Header Code" area in the theme options? You need to put the code there.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I moved the verification code and am still getting the same message from the Google Tags Assistant.

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Top Contributor
# 6
Top Contributor
If you can share your site URL I would check if I can find anything that would cause the problem.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Explorer ✭ ✭ ☆
# 8
Explorer ✭ ✭ ☆
Hello @Fangirl_N,

When I visit your site I am seeing the Google Analytics code has been added twice which may be causing the problem. You'll need to remove the instance where it is being added outside the <head> </head> tags. You'll want to test where you input each code one at a time to ensure you delete the correct input.

Best,

Nick
Marked as Best Answer.
Solution
Accepted by topic author Fangirl N
August 2016

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Top Contributor
# 9
Top Contributor
Hi,

Thanks for sharing your site URL. The problem is caused by CoudFlare's Rocket Loader. It affects how javascript resources are loaded. In automatic mode all scripts are affected so you'll need to add 'data-cfasync="false"' to your GA script tag. Please find more information on the link below:
https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-sc...
Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Google Tag Assistant says Missing analytics.js script When I look at my page, I see a JS line.

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭
Oh, thanks!

Where do I add it? Just before &lt;/script&gt;?