Online documentation working again!

FreeToastHost documentation is back online.

Google Analytics script head in wrong place?

More
6 years 6 days ago #76296 by DF_Dunedin
Hello FTH gurus

I have just inherited our FTH webpage - dunedin.toastmastersclubs.org/ - and have begun the process of renovating it.

For analytics, have received a <head> script tag from Google, and placed this in the "Google Analytics Script Code" box in the admin console.
Code:
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-144859337-2"> </script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-144859337-2'); </script>

However when this is done, Google is still reporting that the tag is missing.

When I view our page source, it appears that the script is being injected into the HTML body rather than the page head.

I wonder if I have done something dumb or if this is a real bug?

Many thanks in advance
Doug F, Dunedin NZ

Dunedin Toastmasters (New Zealand)
Club #2890
The topic has been locked.
More
6 years 5 days ago - 6 years 5 days ago #76306 by DF_Dunedin
I just want to clarify my issue here. I don't actually care where the tag sits and I understand there are very good arguments for it being located in different places in the head or body.

My issue is that the tag, placed where it is, does not seem to be detected by Google on our page.

I have installed the tag in the admin console and as far as I can see I did it all exactly as directed, and can confirm the tag is appearing in the page's source. But, if I use Google Webmaster Tools, I get this:

Verification method: Google Analyics
Failure reason: We could not find any Google Analytics tracking codes on the index page of your site...

i.imgur.com/B5z8Y7H.png

And in another Google Console

No tag found / No smart campaign ID/tag was found on your website...

i.imgur.com/A1y0pa5.png
(Sorry I can't hotlink the images)

I tried using both http:// and https:// and carefully checked the URL, but no difference.

My assumption was the placement of the tag was causing the problem but that could be irrelevant

Thanks again
Doug

Dunedin Toastmasters (New Zealand)
Club #2890
Last edit: 6 years 5 days ago by DF_Dunedin.
The topic has been locked.
More
6 years 4 days ago #76307 by SteveTheTechie
I can see the GA script code in the page source. Try clearing your browser cache.
The topic has been locked.
  • wesb
  • Visitor
  • Visitor
6 years 4 days ago #76318 by wesb
Steve...

I know that our European compliance implementation doesn't put the Google Analytics stuff in unless the visitor accepts cookies, and i can see the GA stuff only after accepting them. In their site, I need to try to log in as site admin before getting the option to accept cookies. I'd suspect that Google won't try to do this.

Under these circumstances, it's possible that Google truly won't see the GA code?
The topic has been locked.
More
6 years 4 days ago #76319 by DF_Dunedin
I tried emptying the browser cache and it made no difference. I can see the code in the page's source but Google's dashboards seem to struggle.

Dunedin Toastmasters (New Zealand)
Club #2890
The topic has been locked.
More
6 years 3 days ago #76326 by SteveTheTechie
If the system is inserting the code as expected, but you are still having issues, then maybe you should get support from Google about why they cannot see it.
The topic has been locked.
Time to create page: 0.109 seconds