- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hello,
I need to map my e-commerce variables (order_id, product_id, etc...) to GA4. I used the e-commerce extension in order to do so, as the documentation says.
When I add the GA4 tag, in the mapping I see there is a section called E-commerce parameters which overrides the values I sat in the extension so my question is: which one is the right procedure?
Thank you
Solved! Go to Solution.
The GA4 tag template has code in it to automatically set those parameters to the e-commerce extension values by default. For example, if you map to "order_total" it will take the mapping, but if nothing is mapped it will use the value from "_ctotal" which is populated by the e-commerce extension. The value of using the e-commerce extension is that you essentially only have to do the mappings once in the extension, and those mappings are then used in any number of tags that would need those parameters to be sent for events like add to cart, product pages, checkout pages, and order confirmations. If you don't know whether a tag is enabled for the e-commerce extension, you can look at the notes in the left bar of the tag and it will let you know if it has been enabled for the e-commerce extension.
The only time you should override the e-commerce extension with a mapping would be if a particular tag needs a product price with a particular formula that doesn't match how you are currently populating your product price (ex: original price vs discounted price). You would then make that calculation in an extension, store the value in a new variable, and map the new variable to the tag to override the e-commerce extension. This would be on an as-needed basis, as the e-commerce extension SHOULD cover everything you need to send to a tag vendor.
Copyright All Rights Reserved © 2008-2023