Reputation: 1
Now I am testing e-commerce using Google Tag Manager on http://shtrafua.com/test-2 but Analytics don`t see this purchases. E-commerce in Analytisc activated. GA debug show
ga("gtm1478156958663.ecommerce:addTransaction", {id: undefined, affiliation: undefined ....
but dataLayer is full fill. I would be grateful for any advice.
I decide problem. I use Enhanced Ecommerce dataLayer syntax. I change Transaction Tag to a Page View with Enable Enhanced Ecommerce and Use Data Layer checked. Now its work. If you use dataLayer.push you dont need dataLayer declaration above the GTM code
Upvotes: 0
Views: 1226
Reputation: 32780
This is not much information to go on, but my guess would be that your GA tag is set to be fired on page load. Since your datalayer is filled only after the GTM tag there is no e-commerce data available on page load, hence all values are undefined and the ecommerce portion of the tag is ignored.
You can easily test this by changing the trigger for your GA to "DOM ready", so the tag fires only after the transaction has been pushed to the datalayer. Or, if at all possible, move the datalayer declaration above the GTM code.
Upvotes: 0