Copy link to clipboard
Copied
Hey up guys... quick question because I know I'll get a good answer here.
I normally set up google analytics by using an HTML file that was generated by the console, downloaded and then uploaded to the root level of the domain in question.
My question is: does google not provide an HTML file anymore? I can find it
Thanks.
Copy link to clipboard
Copied
Google only provide the link to Google with accompanying code in the form of JavaScript. They say to place this code on the head section of the document. I have found this to be render blocking which is the reason that I find it better placed at the bottom of the document.
Having said that, the only one that benefits from Google analytics is Google, the information thus collected is onsold. Every decent web host has a Web Statistics/Traffic Monitor facility which I tend to use.
Copy link to clipboard
Copied
Thanks Ben.
Anyway, the question has just become more complex!
I've just logged into the company's google console and there's numerous versions of URLs for the same domain for a different website that I'm not involved with:
website.com
and so on...
I'm surprised to see this and am wondering if this is skewing figures and is this set up wrong?
Surely if the verification code is present (despite URL prefixes used), then the figures should all relate to the one google account... or am I wrong?
Copy link to clipboard
Copied
They are the different URL variations of the same domain name.
Copy link to clipboard
Copied
Google does what Google does.
Back in the day, Google Webmaster Tools panel contained a settings option for choosing your preferred URL.
But that ended with Google's new Search Console. Nowadays, Google picks the preferred domain for you based on signals it ingests.
For my own reasons, I like to resolve inbound traffic from www and http to my preferred URL at.
https : // example . com
See Consolidate Duplicate URLs
https://support.google.com/webmasters/answer/139066?hl=en
1. Use rel=”canonical” link tag on HTML pages.
2. Use rel=”canonical” HTTP header.
3. Use a sitemap.
4. Use 301 redirects for retired URLs.