0
votes

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

1
Please present pivotal information in your post: don't just provide a link. For the paranoid like me, tell which sites' scripts need to be allowed execution for the link to be any use. - greybeard
All scripts should be allowed (google analytics and tag manager scripts) - KonstantinMiha
Do not comment comments asking for additional information or clarification: edit your post. (All scripts should be allowed would be a red flag for me - if I didn't read it as both google-analytics.com and googletagmanager.com (shtrafua.commight need to be included, too).) Remember to present pivotal information in your post. - greybeard

1 Answers

0
votes

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.