This guide is for Datatrics users who implemented Enhanced Ecommerce in Google Tag Manager and want to use this implementation to send conversions, shopping carts, product views and category view to Datatrics.
Haven't set up Google Tag Manager to send events and custom dimensions to Datatrics? Click here
Sign in to Google Tag Manager and navigate to the Variables section. Create the following User-Defined Variable:
- Type: Data Layer Variable
- Data Layer Variable Name: ecommerce
Head over to the Tags section and add this tag:
- Datatrics Ecommerce
- Tag type: Custom HTML
- HTML: Click here and paste the code the HTML field of Google Tag Manager
- Enable “Support document.write”
- Add all triggers used in your Enhanced Ecommerce implementation (For example: addToCart, Checkout, Purchase, Product view)
When the changes are published, all Enhanced Ecommerce events will be send to the Datatrics Tracking script.