Analytics
1.6K members online now
1.6K 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

GTM Ecommerce implementation vs analytics.js

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

I am probably missing something about how to implement the tracking my website's transaction. So far what the dev. and I have done is to implement the GTM container, the Universal Analytics tracking code and we have also tried to collect data from our "thankyou" page, which we show after a transaction.

So here's the code, fetched from GTM assistant, we are using, made up by custom variables:

dataLayer
[
{
"gtm.start" : 1453731261837 ,
"event" : "gtm.js"
},
{
"shop_id" : "Adm1n" ,
"customer_id" : "Stefano" ,
"product_id" : "511" ,
"product_worldregion" : "Northern Europe" ,
"product_country" : "NOR" ,
"job_id" : "512" ,
"job_status" : "-1" ,
"length" : "1" ,
"price" : "1.00" ,
"fee" : "5.00" ,
"total" : "6.00" ,
"customer_country" : "Azerbaijan" ,
"customer_amount" : "1"
},
{
"event" : "gtm.dom"
},
{
"event" : "gtm.load"
}
]

We have chosen to trigger this tag as Pageview in the "thankyou" page.

The problem is that none of these pieces of data are coming into GA. Are we missing something? and what's the difference between implementing our solution and the one that google presents here: https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce. The latest seems to me being the same thing, just hard-coded into the website.

 

Thank you in advance!

Stefano

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Stefano B
February 2016

Re: GTM Ecommerce implementation vs analytics.js

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆
If you want to implement enhanced e-commerce via GTM you have to use ecommerce object in dataLayer.
You can read more about it here:
https://developers.google.com/tag-manager/enhanced-ecommerce#purchases

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Stefano B
February 2016

Re: GTM Ecommerce implementation vs analytics.js

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆
If you want to implement enhanced e-commerce via GTM you have to use ecommerce object in dataLayer.
You can read more about it here:
https://developers.google.com/tag-manager/enhanced-ecommerce#purchases

Re: GTM Ecommerce implementation vs analytics.js

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
thanks so much Tomasz_C!

May I ask you what is the difference between the solution you suggested me and this one also suggested by google?
https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

Tnx!

Re: GTM Ecommerce implementation vs analytics.js

Participant ✭ ✭ ☆
# 4
Participant ✭ ✭ ☆
What you posted is implementation directly on website without GTM.
And I gave you link to documentation how you should do this with GTM.
You can't implement base analytics tracking in GTM and put e-commerce tracking to the website because it won't work together. You have to decide which way you want to do that.

Re: GTM Ecommerce implementation vs analytics.js

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thank you!