AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.7K members online now
2.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

Missing Ecommerce Data

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi everyone.

 

I am a beginner trying to figure out what's up and down with my eCommerce tracking.

 

I am using Wordpress/Woocommerce, running a webshop - www.rawsnacks.dk

 

Initially ecommerce tracking was working fine with the simple code snippet from GA (without ecommerce require) giving me revenue data etc. Inserted via my theme.

ga('require', 'ecommerce');

<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-xxxxxxxx-x', 'auto');
ga('send', 'pageview');

</script>

 

After a month I suddenly got the "Missing Ecommerce Data" notification. Even some of my Goals stopped working. I then removed the tracking from my theme and tried out some different plugins. It didn't help.

 

I then realized I could make use of Google Tag Assistant Recordings (GTAR). I did some test buys with PayPal sandbox enabled and realized my thank-you page didn't send any hits. I have disabled any plugins and have returned to the method of inserting the code snippet via my theme again.

 

I have tried out this code snippet (seen on this thread).

<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>

It actually worked! Smiley Happy

 

But I am getting the data like "Fluffy Pink Bunnies" etc.... +/- everything from the code snippet above. Not my data, from my items.

 

What am I missing?  I have read many guides explaining the "addItem", "addTransaction" implementation, but can't wrap my head around how to get my site sending the correct data.

 

Any help would be much appreciated.

 

Thanks Smiley Happy

Re: Missing Ecommerce Data

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭
Hi.

I have never used its plug -ins of WordPress.

However , and the source code of each cart , developers and tool see the header of , would not the hint is obtained .

At least , I have deficiencies of the code is not seen.....

Re: Missing Ecommerce Data

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Yoshida.

I'm sorry, but I don't understand what you mean?

Re: Missing Ecommerce Data

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Sorry,
I think the code is not a problem .