Google analtyics code placement
-
I saw that Google suggests the analytics code be in the , will this effect the page load if it is in here? Also, is it a problem to have it in the body?
-
if you are placing the Asynchronous tracking code in the head you will be fine. I would keep the code in the head, I don't really see any good reason for putting the code in the body.
-
If you use the Asynchronous tracking code it shouldn't cause any noticeable lag in page load times
Placing the code inside the body tag won't validate through W3C. There's really no reason I know of to place it anywhere else.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Multiple GA codes, one site.
Hi all, Is anyone running two GA codes on one website successfully? My organisation own a number of websites so we used to have one global GA code on all our sites to track global stats, and then we would also have site unique GA on each property to just track that one property. This worked fine, but of late we seem to be getting no data from the globally based code. Obviously, with the site-specific codes we can enter the name for that domain in GA but for the overall code, it is called 'all.com' I'm wondering if Google has now tied the GA domain to the code or if we are doing something wrong. All the codes are the same as they always were but have stopped working. As a stop gap, we have swapped to using Piwik as the all.com code. However, we are then comparing the stats in two different analytics programs so will get a different result. Also, it would be nice to be able to add the all.com to tools such as this to generate weekly reports. Anyone else having GA woe like this? Thanks. Carl
Reporting & Analytics | | WonkyDog0 -
Understanding Average Position in Google Anaylitics
Hello here, I have a question about the Queries report under "Search Engine Optimization" in Google Analytics: is the "Average Position" information a reliable one? I have a lot of queries that appear, from that report, to average first position, but when I verify that on Google by connecting anonymously, I can't even find my result on the first page! To me, that information is worthless and makes me think all the rest of that report is unreliable. If anyone can help me to understand it, I'd really appreciate it. Thank you in advance for any thoughts.
Reporting & Analytics | | fablau0 -
Setting up goals in Google Analytics
Hello! This question is seems so obvious that I'm also ashamed to ask... almost. If the goal of a website is to have a visitor complete a contact form, when setting up the Goal in Google Analytics (as a "URL destination") the URL of choice would be the form's thank you page, correct? Because that's the page that proves the visitor completed the task we want them the achieve. Right? Thanks!
Reporting & Analytics | | SmileMoreSEO
Erik0 -
Google Analytics tracking code for completely new website
Hello! I use Google Analytics to monitor our company's websites. In the coming weeks we will roll out a brand new website for one of our brands to replace its current site. The domain name will remain the same. My question is, should I use the same tracking code that's been used on the existing site for the new site, or is there a benefit to creating a new tracking code? Thanks in advance!
Reporting & Analytics | | SmileMoreSEO
Erik0 -
Google Analytics (not provided)
Hi A greater and greater % of clicks is showing as "not provided" - does any one know of any good external tracking software which will show this information? Thanks
Reporting & Analytics | | jj34340 -
Re-branding with Google Analytics
GM Mozzers, I apologize in advance if my description of this issue is confusing, but I'm doing my best here. Anyway, due to legal reasons, one of the publications I manage was forced to change their name. We set-up a 301 redirect from the previous domain and have also set-up an analytics profile for the new domain, however, as it stands, visits to the old domain outnumber those to the new domain 12:1. Is there anyway to set-up my analytics profile to the new URL so that this traffic is being attributed to the new domain and the new site, since, after all, it is a redirect. I hope that I explained this sufficiently. Any and all insight will be very much appreciated. Thank you in advance.
Reporting & Analytics | | NiallSmith0 -
My Google Webmaster Search Queries are 0??!!
For the past 2 days Google Webmaster has recorded 0 search queries to my site, but traffic seems stable. Any ideas about why this is happening and what I should do about it? Or is it a Google glitch I should not be concerned about (hoping for this option)
Reporting & Analytics | | theLotter0 -
Looking for a Google Analytics expert
Looking to hire a Google Analytics expert for a project. Dealing with trying to track traffic across multiple domains and then work with the Ecommerce options. Contact Jeff Logan @ Avelient with costs and time frame for work. [personal information removed by editors. please contact via private message system to exchange information]
Reporting & Analytics | | Avelient0