5.6K members online now
5.6K members online now
Understand the information in your Optimize reports and in your Google Analytics reports.
Guide Me
star_border
Reply
Highlighted

Double counting transactions

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

 

We've just implemented an experiment on an ecommerce site.

 

All the tracking was working perfectly before this experiment started but since we've started it we're finding all transactions are being duplicated in GA, so in the overview report we see double the number of transactions when compared to the sales performance report. The odd thing is, it isn't effecting the revenue number, just the number of transactions being recorded.

 

We've implemented the GO code alongside the GTM code, following the instructions to the letter

 

<head itemscope itemtype="http://schema.org/WebPage">
		<meta charset="utf-8" />
		<script>			
			window.dataLayer = window.dataLayer || [];			
		</script>		

		<!-- Google Tag Manager -->
		
			<!-- Page hiding snippet (recommended)  -->
			<style>.async-hide { opacity: 0 !important} </style>
			<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
			h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
			(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
			})(window,document.documentElement,'async-hide','dataLayer',4000,
			{'GTM-K7RJ7S4':true});</script>

			<!-- Modified Analytics tracking code with Optimize plugin -->
			<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(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','https://www.google-analytics.com/analytics.js','ga');

			ga('create', 'UA-28883833-1', 'auto');  // Update tracker settings 
			ga('require', 'GTM-K7RJ7S4'); 
			</script>

			<script>
				(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
					new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
					j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
				})(window,document,'script','dataLayer','GTM-NQN4G9');
			</script>

 

Has anyone come across this and know a way to fix it?

 

All help appreciated.

 

Thanks

Alex

Marked as Best Answer.
Solution
Accepted by topic author Alex O
2d

Double counting transactions

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Have managed to resolve this myself.

 

When adding in the ecom data layer, you need to ensure this appears below the modified Analytics code but above the GTM code, this will ensure that transactions aren't double counted.