Analytics
2.4K members online now
2.4K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, our ecommerce data isn't showing in analytics, we've been trying for a couple of weeks to get it to work, can anyone help?

 

This is the code:

 

(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-34213231-1', 'hi5electronics.co.uk');
ga('send', 'pageview');

 

	<script type="text/javascript" src="../js/ga.js">		// ecommerce
		ga('require', 'ecommerce');
		ga('ecommerce:addTransaction', {
                    'id': "1573278",
		    'revenue': "162.00"		});
		//ga('ecommerce:addTransaction', {
			//'id': '0915',
			//'revenue': '12'
		//});
		ga('ecommerce:send');
		ga('ecommerce:clear');
	</script>

 Many thanks

2 Expert replyverified_user

Re: Ecommerce data not showing in analytics

Google Employee
# 2
Google Employee
Hey Catherine,

There could be a couple of issues here.
1) In Admin > Ecommerce (under the right most panel), have you enabled ecommerce or enhanced ecommerce? The "require" command varies accordingly.
2) Are you looking at a view in the property: 34213231-1 ?
3) Are you looking at a transaction report or a product report?
4) Have you given it 24 hours since the transaction took place for it to show up in the account?
5) Is there a filter for traffic to a domain apart from hi5electronics.co.uk ?
6) Is there a code on the site for any property apart from UA-34213231-1?

One way of debugging it is checking if a collect tag fires for the ecommerce code, in the network tab of chrome developer tools, on the transaction success page that has this ecommerce code.

Best,
Arjun

Re: Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Arjun

Thanks for the response. The answers are below:

1) In Admin > Ecommerce (under the right most panel), have you enabled ecommerce or enhanced ecommerce? The "require" command varies accordingly.
We have enabled "Ecommerce" not "Enhanced Ecommerce"
2) Are you looking at a view in the property: 34213231-1 ?
Yes
3) Are you looking at a transaction report or a product report?
I've tried both, there's no data in either - in fact there's no data in any of the Ecommerce reports.
4) Have you given it 24 hours since the transaction took place for it to show up in the account?
Yes - we've been trying for a number of weeks now Smiley Happy
5) Is there a filter for traffic to a domain apart from hi5electronics.co.uk ?
No
6) Is there a code on the site for any property apart from UA-34213231-1?
No

I've tried Tag Assistant and can't see anything ecommerce when on this page - but I don't really know what I'm looking at in Tag Assistant. Here's an example page we've been using for testing:

http://www.hi5electronics.co.uk/shop/payment/success.php?Status=Success&TransID=1573278&Amount=162.0...

Thanks Smiley Happy

Re: Ecommerce data not showing in analytics

Top Contributor
# 4
Top Contributor

Hi Catherine,

 

Please find the fixed code below.

 

<script type="text/javascript" src="../js/ga.js"></script>
<script>
	ga('require', 'ecommerce');
	ga('ecommerce:addTransaction', {
				'id': "1573278",
		'revenue': "162.00"		});
	//ga('ecommerce:addTransaction', {
		//'id': '0915',
		//'revenue': '12'
	//});
	ga('ecommerce:send');
	ga('ecommerce:clear');
</script>

 

The problem was the opening / closing script tags.

 

Hope this helps.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
No way - I read that code about 20 times!!!!

Thank you!!!

Sent from my iPhone

Re: Ecommerce data not showing in analytics

Google Employee
# 6
Google Employee
Hey Catherine,

Did it work? I thought it still wouldn't show up because the pageview wasn't triggered before the ecommerce code sends the data.

Do let us know?

Best,
Arjun

Re: Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi Arjun

We've changed the code today, now just waiting to see if it works. I still can't see the ecommerce data in Tag Assistant though.

I'll update tomorrow!

Thanks
Catherine

Re: Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Hello again

It doesn't seem to be working Smiley Sad we waited a few days to check but we're not getting any results in for that page now, not even pageviews. The code is now as follows:

&lt;script type="text/javascript">
(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-34213231-1', 'hi5electronics.co.uk');
ga('send', 'pageview');
&lt;/script&gt;

&lt;script type="text/javascript">
// ecommerce
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': "1573278",
'revenue': "162.00" });
ga('ecommerce:send');
ga('ecommerce:clear');
&lt;/script&gt;

Thanks for any help you can give!

Thanks
Catherine

Re: Ecommerce data not showing in analytics

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
<script type="text/javascript">
		(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','//www.google-analytics.com/analytics.js','ga');
		ga('create', 'UA-34213231-1', 'hi5electronics.co.uk');
		ga('send', 'pageview');
	</script>

	<script type="text/javascript">
		// ecommerce
		ga('require', 'ecommerce');
		ga('ecommerce:addTransaction', {
			'id': "1573278",
			'revenue': "162.00"		});
		ga('ecommerce:send');
		ga('ecommerce:clear');
	</script>

Re: Ecommerce data not showing in analytics

Top Contributor
# 10
Top Contributor
Hi Catherine,

I just checked hi5electronics.co.uk and I see that you are using Google Tag Manager and it includes the Google Analytics tracking tag. You need a different code to use with your setup. Do you have Google Tag Manager installed on your thank you page? Can you send me the entire source code of the thank you page?
Thanks.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital