1.9K members online now
1.9K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me

GTM, Datalayer and E-Commerce tracking problem

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

since the end of May due to a problem with the google tag manager account we've lost all the configuration in the GTM. Now I'm trying to reconfigure it considering that 1) This is my really first experience with these tools 2) I don't have documentation on how the GTM was configured.


What I'm doing is to reverse engineering the GTM configuration starting from what I can see in the HTML and in the Google Analytics reports.


One of the reports that stopped working is the one related to E-commerce.


From the HTML I see the following instruction:


dataLayer.push({"event":"Purchase","customerEmail":"","orderNumber":"OIT00019938","orderRevenue":"31,97","orderShippingValue":"4,92","orderDiscountValue":"0,00","orderShippingCountry":"IT","orderShippingZip":"20141","orderInvoiceCountry":"IT","orderInvoiceZip":"20141","orderPaymentMethod":"cash_on_delivery","orderShippingMethod":"standard","orderCouponLabel":"","orderAffiliate":"(not set)","items":[{"sku":"00080988","fullSku":"00080988-IT_48-ffffff","orderNumber":"OIT00019938","itemBrand":"C'N'C COSTUME NATIONAL Long-sleeve-shirts","itemMacro":"camicie","itemMicro":"camicie maniche lunghe","itemGender":"man","itemSeason":"spring-summer","itemSize":"IT_48","itemColor":"bianco","itemPrice":"31,97","itemQuantity":"1"}]});


I've tried to configure the GTM with differente ways but none of them worked. I have a rule that fires whenever an event "Purchase" happens (and I see that it really fires with the GTM debug view) and I've created different tags playing with type (event, page view), enabling Enable Enhanced Ecommerce Features and DataLayer etc. Unfortunately it never worked so far. Since I'm using a lot of custom variables in the datalayer I think that somewhere in the GTM I should map them with the ones used by Google Analytics, but, if true, I don't know where...


Since everything worked fine until the end of May and that the only thing that changed is the suddenly disappear of GTM, I assume that configuring in the right way the GTM everything should start work again.


Any idea?



1 Expert replyverified_user

Re: GTM, Datalayer and E-Commerce tracking problem

Top Contributor
# 2
Top Contributor
Hi Alexio
For some reason, it appears that you have two JSON dataLayer objects there. That's not going to work.

To be honest, this is a massive challenge to reverse engineer things based on the dataLayer only. Obviously a lot easier to do it the regular way.

If I was in your position, I'd use this opportunity to create a new measurement plan and implement tracking again. The main advantage here is the new enhanced commerce reporting in GA which requires GTM.

We've been implementing this for clients over the past few weeks and it's nothing short of amazing. In some cases, replacing clients ecommerce backend reporting features.

I know that's not what you want to hear but there's a lot more to be gained from starting again than there is to be gained from trying to hack together the dataLayer and guess what custom dimensions you used where.