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
-
Is there a way to find out who the admin of a Google Analytics account is?
We have a client who has been searching high and low to gain access to the GA account that is tied to their website, but previous agencies keep stating they don't have access. Is there a way to find out who the admins are on a GA account with the tracking number so we can reach out to that person and ask them to admin the client?
Reporting & Analytics | | marketingmediamanagement0 -
All goal conversion in Google analytics showing under referral
Hi All, I have switched my website from http to https After switching from http to https all goal conversions in Google analytics showing under referral.I have also updated the GA code for https. Please help me out to fix the issue. Thanks
Reporting & Analytics | | Alick3000 -
Google Analytics Events that lead to Goals (conversions)
Hello! I'm in the process of setting up Events in Google Analytics to track the performance of banner ads on our site. While that will take care of the action performed by the visitor (i.e. the click on the banner), it doesn't tell me if the visitor ultimately completed the form where the banner ad directs them (which is set up as one of out site's Goals). Once the Event is in place, will I be able to track the Goal conversions that it leads to? It's nice that Events will tell me which banner drove someone to the form, but if I'm not able to see if that Event led to a Goal conversion it seems like something will be missing. So, is this something that's already available within Goals or Events reporting, or is there an additional step I need to take? Thanks in advance for your feedback! Erik
Reporting & Analytics | | SmileMoreSEO0 -
Mobile Site on Google Analytics
Hi mozzers, We just launched a mobile site and I was wondering what are the main steps to follow for gettting your mobile site tracked via GA (m.example.com)? We have a profile for www.example.com GATC: javascript or PHP to install? Should the profile be on a subdomain? What else to consider when implementing a mobile site on GA? Thanks
Reporting & Analytics | | Ideas-Money-Art0 -
Google Analytics for multiple languages on multiple domains
Hi folks A quick question in regards to setting up Google Analytics for a website with multiple languages on multiple domains. The domains that needs to be tracked are: www.example.com -> English www.example.se -> Swedish www.example.dk -> Danish To my best knowledge this can be acheived in Google Analytids using 3 different setups: Different accounts Different properties Profiles What would you guys consider the best approach?
Reporting & Analytics | | Resultify
Pros and cons? Have a great day Fredrik0 -
How Google handles keywords and punctuation?
How does Google handle punctuation of keywords within its search? If I have three keywords together, but on the site there is a question mark between them, does Google ignore the question mark? Or should I think of a new way of writing the content so Google likes it more? And would this apply with articles (a, the, etc) and prepositions such as (in, of, etc.)? Thanks a lot.
Reporting & Analytics | | Rocket.Fuel1 -
Google Analytics session update question
Hello, With reference to seomoz blog post - http://www.seomoz.org/blog/panda-24-and-analytics-session-update-rolled-out-simultaneously#jtc151292 , i would like clarification about the following - User searches Google for "Product Name" and clicks on your AdWords advertisement. User leaves site and searches a few more times, click on competition and comparing prices and features. User ultimately decides to with your product, Googles "Your Brand + Product Name", clicks your organic listing, and buys the product. This whole process takes less than 30 minutes. "Your Brand + Product Name" will appear in your organic keyword report with 1 visit. My question is whether "Product Name" will also appear in organic keyword report with 1 visit if the visitor is not signed in. ( as search won't be encrypted ) Thanks
Reporting & Analytics | | seoug_20100 -
Conflicting Analytics: Getclicky vs. Google Analytics
Removal of an old getclicky code (and installation of new tracking code) from my site after some changes resolved inaccuracies in my page view/bounce rate information. Prior to adding the correct getclicky code, getclicky was showing 95% plus bounce rate on my site. I knew this was wrong because GA showed around 40%. Ironically, now that my getclicky account is working (showing a 30% bounce rate), GA bounce rate is steadily climbing. Is it best to just stick with one analytics account so that the codes don't conflict? Is it possible to have two accurate analytics accounts at the same time?
Reporting & Analytics | | JSOC0