Two Analytics Code
-
Hi Moz Community!
I've been working with a client’s website and found it has 2 analytics code with same ID. I need to understand which one is correct before removing anyone of them, below are the both scripts.
First one
Second one
Any help would be appreciated!
Regards,
S
-
I understand, but my point is, while replacing the outdated analytics code, with same UA Id, is this going to affect eCommerce tracking?
-
Hi,
For e-commerce tracking two options are available - you could use the "normal" e-commerce tracking or the enhanced e-commerce tracking. Enhanced e-commerce is the newest & most advanced way of tracking.
Both would require some additional coding - you can find how to implement them on the links above - or check these articles (Understanding enhanced e-commerce tracking & Implementing enhanced e-commerce tracking).
Hope this helps,
Dirk
-
Thanks Dirk,
The code I am talking about is for E-commerce website, By changing the code, dose it effect on eCommerce tracking or Google tag manager?
-
Hi,
Both codes are outdated (the first one seems to miss a part) - it's better to use the universal tracking code which looks like this:
This script should be put just before closing the head tag.
You can check the implementation with the Analytics Chrome plugin to see if everything is ok: https://chrome.google.com/webstore/detail/page-analytics-by-google/fnbdnhhicmebfgdgglcdacdapkcihcoh
Rgds,
Dirk
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
-
New website server code errors
I launched a new website at www.cheaptubes.com and have recovered my search engine rankings as well after penguin & panda devestation. I'm continuing to improve the site but moz analytics is saying I have 288 medium issues and i see the warning "45% of site pages served 302 redirects during the last crawl". I'm not sure how to fix this. I'm on WP using Yoast SEO so all the 301's I did are 301's not 302's. I do have SSL, could it be Http vs Https?
Reporting & Analytics | | cheaptubes0 -
Google Analytics - Adding a sub-domain
Hi I have a google analytics query.
Reporting & Analytics | | Niki_1
I have a main site with a google analytics tag and I have 2 forms that sit on a subdomain with a different GA code. As I would like to measure end to end tracking, I would like the same GA code on the subdomain. What is the best way for me to implement this? Would I need to make some changes to the GA code that sits on the main site or can I add the the GA code from the main site onto the subdomain? Thanks0 -
How do you adjust the Google Analytics date range?
Hello! Every time I log into Google Analytics (via desktop), the date range is set to October 1, 2013 to October 28, 2013. I've looked throughout the GA settings to find a place where I change this default setting to anything else ("Last week?") but have not be able to find where that setting is. Can you help? Losing my mind,
Reporting & Analytics | | SmileMoreSEO
Erik0 -
Client has two default analytics accounts
A client has provided me with their analytics access but i notice that there are two default accounts on their account. They have two UA numbers. The first UA number is in their company name and the other UA number is in another company name with my clients website underneath. Their UA number in their company name is not showing any results however the other company UA number is showing results. Does anyone know why they will have two accounts and if this will cause a problem when trying to link their seo moz campaign to their analytics to track their keywords?
Reporting & Analytics | | Shelly760 -
Google Analytics Tracking Code Queries
Hello, I have taken on a new client who has Google Analytics installed. The tracking code is set to 'single domain'. Recently they added a mobile site using a sub-domain (m.website.com) which means that Google Analytics is not picking up this traffic. I want to revise the account so that I have a master account (raw data) and then profiles for the mobile site, main domain (www.website.com) and one other for a sub-domain that they are using. I am aware that there is mobile specific tracking code however I thought it would be easier (re conversions/goals/eCommerce tracking) to not use this and by changing the account to 'multiple domains' we could also get data for another sub-domain that they are using . My questions are: Am I right to want to use individual profiles over web properties. If not please explain why. When installing the tracking code (where the profile number is changing) I believe that I need to add that code with the changing profile number to the sub-domain sections. So my question is a) is that correct, and b) if I use a profile number on a sub-domain section will the master account still gather the data for the main URL as well as all sub-domains. If I change the master account from using 'single domain' tracking code to 'multiple domain' tracking code will this affect historical data? Will I lose the data? When changing from 'single domain' tracking to 'multiple domain' tracking does this affect eCommerce tracking? Or do we only need to be adding the additional lines of tracking code that allow sub-domains to be tracked? The web developers are using asynchronous code however half is in the and the other half is at the bottom of the source code. Given that traffic is being reported in the Google Analytics account should I have any concerns that the code is split? I have done a lot of reading but seem to be going around in circles, so your help is much appreciated! Thanks,
Reporting & Analytics | | Unity
Dinny0 -
What is s.ytimg.com in google analytics?
My clients GA reports 273 visits from s.ytimg.com. I go to the site, it doesn't exist. I googled it, there were some code with s.ytimg.com in it, but nothing I could understand. Anybody have an idea where this comes from?
Reporting & Analytics | | endlessrange0 -
301 Tracking with Google Analytics hurts SEO?
Hey guys, I have an old-domain.com and a new-domain.com. old-domain.com has reputation and through a 301 redirect it's handling it over to new-domain.com. I want to know how many people still visit old-domain.com and track this with Google Analyitcs. I read the best solution for this would be a Google Campaign URL. My question: Does a URL like "http://www.new-domain.com /?utm_source=&utm_medium=redirect&utm_campaign=" hurt the effectiveness of the 301 redirect?
Reporting & Analytics | | optimiert-es0 -
How do shortened links show up in Google Analytics?
Hey, How do shortened links show up in GA? So if I tweet about something and use bitly, does twitter get the referral? I am thinking not. I have never seen bitly show up as a referrer, but we gets lots of clicks from those links. Hmmmm. Anyone? E
Reporting & Analytics | | ErinTM0