How to disable ecommerce tracking for a certain tag?

tomas_balciunas
Rookie Contributor
tomas_balciunas
I have ecommerce extension defined and some of the tags are using it. However, I also have Google Universal Analytics tag and I do not want to fire ecommerce data into GA. I how can I disable ecommerce tracking for GA tag?
4 REPLIES 4

How to disable ecommerce tracking for a certain tag?

andrew_rose
Not applicable
andrew_rose
Hi Tomas, Do you not want Google Universal to ever use E-commerce, or do you want it to be selective? Either way would require editing of the template, but the edit would be easier if you never wanted to use the e-commerce data. Thanks, Andrew

How to disable ecommerce tracking for a certain tag?

fiann_ohagan
Employee Emeritus
fiann_ohagan
Hi Tomas, most tags fire a purchase event based on the _corder variable being set. This is a "special" data layer variable which is created by the Ecommerce Extension to hold the order id. If the order id variable is populated, then the tag will fire a purchase event. If it's not populated, then it will not. You can disable ecommerce tracking for a specific tag by creating a Set Data Values extension and scoping it only to the tag you want to disable. You want to set the variable "_corder" using a "Text" value and leave the value field on the right empty. Because the extension is scoped to a specific tag, then it has a copy of the data object, so the order id is deleted for the specific tag, but not for all your other tags. This should work for any tag that is ecommerce-enabled, and hopefully you won't need to edit the tag template.
Highlighted

How to disable ecommerce tracking for a certain tag?

andrew_rose
Not applicable
andrew_rose
One thing to remember is that this won't work for all tags. Some use other methods of determining when the commerce data should be used. For these tags, SiteCatalyst for example, you will need to determine what is used and set the variables accordingly, of make changes to the template.

How to disable ecommerce tracking for a certain tag?

tomas_balciunas
Rookie Contributor
tomas_balciunas
Hi Fiann, We tried setting it up as you suggested. However, it was not working. It might have been because we are using different data layer. In the end we ended up adding 1==2 in the if statement in GA template. Thanks guys for suggestions.