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
-
Phantom search results showing up in analytics
Hi, I'm getting these weird phantom search results showing up in my analytics account which is skewing my results. I have a wordpress site, and I do have some custom search results pages, but analytics is telling me these hits are coming from google- which I doubt. The end of the query string (&cat=plus-5-results) is not coming from a link created within my site. Anyone have any ideas? Failing that, would somebody be kind enough to explain how I can ignore these hits, but retain other, valid search result requests? Thanks reading! Will Screenshot%202019-05-16%20at%2022.32.10.jpg
Reporting & Analytics | | madegood0 -
Two Tracking for Banners - Internal Promotion & Event Tracking -Any Impact on Analytic Figure or Bounce Rate?
Hi All, I have implemented Internal Promotion - https://developers.google.com/tag-manager/enhanced-ecommerce#promo-clicks for my ecommerce site on homepage banners. Along with this I did event tracking for Banner click. So any negative impact of bounce rate or other reports? Thanks
Reporting & Analytics | | Arnold30 -
Does Universal Analytics auto generate events?
Hi Mozzers, I have been noticing for one of my clients that there are thousands of events generating which I never added a code snippet for ga('send', 'event', 'button', 'click', 'nav buttons', 4);. The code I am seeing instead is following the syntax **PDF FILE NAME.**I don't even use Tag Manager. So are these auto generated? Label names of files aren't great though so I still believe that adding that piece of snippet _ga('send', 'event', 'button', 'click', 'nav buttons', 4);_can still bring some added value. Do you think it still does? Thanks!
Reporting & Analytics | | Ideas-Money-Art0 -
Most of the goal conversion in Google analytics showing under referral
Hi All, I have already asked this question twice here but issue is not resolved yet. http://moz.com/community/q/all-goal-conversion-in-google-analytics-showing-under-referral http://moz.com/community/q/some-goal-conversion-in-google-analytics-showing-under-referral In Google analytics most of the goal conversion in Google analytics showing under referral from payment gateway sites (Paypal.com & epdq.co.uk). I have applied all the possible solution that suggested by Moz community experts & Google Adwords support team but it is not resolved yet and it is really weird answer to give client that I have applied all possible solution and issue is still not solved. Lastly I am sharing Cross domain tracking code here that I have used on my site. Please check once and let me know if code is correct and If not correct please help me out to correct the code or suggest any other way to fix the issue Cross domain tracking code ======================= <script type="text/javascript">(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Reporting & Analytics | | Alick300
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('require', 'linker');
ga('linker:autoLink', ['paypal.com', 'payments.epdq.co.uk'], false, true);
ga('create', 'UA-xxxxxx', 'auto', { 'allowLinker': true});
ga('require', 'displayfeatures');
ga('send', 'pageview');</script > I have hide the UID in above code. Thanks0 -
Universal Analytics Ecommerce Tracking in Magento
We have a problem similar to this: http://stackoverflow.com/questions/22229312/universal-analytics-could-not-track-transaction-in-magento On a client's website. I need an absolute knock-out EXPERT at solving this to give us a quote on doing something like this. It's very urgent but it is paid. Basically the site used the old tracking code, worked, then client said they wanted new data so we upgraded to Universal. Now everything works but Ecommerce tracking. Desperately need help! Thanks all!
Reporting & Analytics | | MattAntonino0 -
Mobile redirect causing traffic drop? Can I move analytics code to capture them as visitors before redirecting them?
Yesterday I implemented a mobile redirect as I don't have a mobile version of my site. As a result I've seen a drop in traffic which makes sense as my redirect script is at the top of the page. If I were to move the redirect script below the analytics code would that allow me to still track mobile users? Would this affect my bounce rate though?
Reporting & Analytics | | SamCUK0 -
Cover my tracks / two websites on the same Analytics
Hi, I've got 2 websites and I like one of them to make some links to the other one. These two sites are on the same Google Analytics account. They have been set up 3 month ago and they have some articles on them. I've heard that Google can see that those websites are related in my Analytics and use this information to give less power to the link I could make between them. What do think about it and what do you recommend me ? Shoud I closed the Analytics account ? Or down one of the website and rebuilt it whith a different domain / host / analytics ? The thing is if I delete one of the website i'll be force to republish the articles, because there are links on it, and they're part of a deal I've already made. Thank you
Reporting & Analytics | | Spleen0 -
Analytics bounce rate change
Hi mozzers, I have a little riddle. A few weeks ago the bounce rate on one of our website dropped 90% - from 45 % average to 5 % average. We haven't changed much in the code of the site, layout or anything else. The traffic is pretty stable too. Anyone can guess why? Or have experienced something similar? xOvrb.jpg
Reporting & Analytics | | ThomasHgenhaven0