Analytics
3.7K members online now
3.7K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Are we tracking Ecommerce Correctly?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey everyone,

 

I've been following steps to have Ecommerce tracking for my Google Analytics account all over the internet. I have been able to see the total amount of conversions and sales in a day..but I am not able to see the individual sales come in through Ecommerce..whole Ecommerce reports are 0's. 

 

I have turned on my Ecommerce settings, created Funnel steps leading to our thank you page (after purchasing/signing up), HTML code that's basically the receipt for what our consumers purchase. 

 

Is there anything else I am missing or need to do? We are trying to track down individual sales and discover where they are coming from. 

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Career A
February 2016

Re: Are we tracking Ecommerce Correctly?

Participant ✭ ✭ ☆
# 8
Participant ✭ ✭ ☆

Yes, the whole code should looks like this:

 

<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXX-Y', 'auto');
ga('require', 'ecommerce');
ga('send', 'pageview');
ga('ecommerce:addTransaction', {
'id': '1234', // Transaction ID. Required.
'affiliation': 'Acme Clothing', // Affiliation or store name.
'revenue': '11.99', // Grand Total.
'shipping': '5', // Shipping.
'tax': '1.29' // Tax.
});
ga('ecommerce:addItem', {
'id': '1234', // Transaction ID. Required.
'name': 'Fluffy Pink Bunnies', // Product name. Required.
'sku': 'DD23444', // SKU/code.
'category': 'Party Toys', // Category or variation.
'price': '11.99', // Unit price.
'quantity': '1' // Quantity.
});
ga('ecommerce:send');
</script>

 

 

View solution in original post

Re: Are we tracking Ecommerce Correctly?

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

Re: Are we tracking Ecommerce Correctly?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thought we did..but we are going through the steps again and giving it another try.

I am guessing it should be working if we follow this precisely?

Re: Are we tracking Ecommerce Correctly?

A T
Participant ✭ ✭ ✭
# 4
A T
Participant ✭ ✭ ✭
Hi,

Try to debug on the thank-you / receipt page:

You can easily debug on the website with GA debugger:
https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna

You can check in chrome, console tab with 'Preserve log' turned ON.

Best Regards,
GA Guru.

'Star' or 'Accept as Solution' if it helped.

Re: Are we tracking Ecommerce Correctly?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thank you, I will give it a try but before I do so..I want to make sure that the code I have listed below is the correct code I should be using to track Ecommerce.. I got it from this site: https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce

Please let me know if I am missing anything in the code..do I need to have my websites tracking ID in it as well?
Thank you

ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': '1234', // Transaction ID. Required.
'affiliation': 'Acme Clothing', // Affiliation or store name.
'revenue': '11.99', // Grand Total.
'shipping': '5', // Shipping.
'tax': '1.29' // Tax.
});
ga('ecommerce:addItem', {
'id': '1234', // Transaction ID. Required.
'name': 'Fluffy Pink Bunnies', // Product name. Required.
'sku': 'DD23444', // SKU/code.
'category': 'Party Toys', // Category or variation.
'price': '11.99', // Unit price.
'quantity': '1' // Quantity.
});
ga('ecommerce:send');

Re: Are we tracking Ecommerce Correctly?

Participant ✭ ✭ ☆
# 6
Participant ✭ ✭ ☆

Your code seems to be fine. But before it you should have on your site standard Analytics tracking code.
Do you have it?

 

(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-XXXXXXX-Y', 'auto');

Re: Are we tracking Ecommerce Correctly?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
No, that's probably what I have to add as well. Do I put the tracking code before the Ecommerce code on the thank you/register page as well?

Thank you!
Marked as Best Answer.
Solution
Accepted by topic author Career A
February 2016

Re: Are we tracking Ecommerce Correctly?

Participant ✭ ✭ ☆
# 8
Participant ✭ ✭ ☆

Yes, the whole code should looks like this:

 

<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXX-Y', 'auto');
ga('require', 'ecommerce');
ga('send', 'pageview');
ga('ecommerce:addTransaction', {
'id': '1234', // Transaction ID. Required.
'affiliation': 'Acme Clothing', // Affiliation or store name.
'revenue': '11.99', // Grand Total.
'shipping': '5', // Shipping.
'tax': '1.29' // Tax.
});
ga('ecommerce:addItem', {
'id': '1234', // Transaction ID. Required.
'name': 'Fluffy Pink Bunnies', // Product name. Required.
'sku': 'DD23444', // SKU/code.
'category': 'Party Toys', // Category or variation.
'price': '11.99', // Unit price.
'quantity': '1' // Quantity.
});
ga('ecommerce:send');
</script>

 

 

Re: Are we tracking Ecommerce Correctly?

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
Thank you so much! We are just starting to work with Google Analytics, I really appreciate your help!