Tags without Ecommerce trigger and js code

Bronze Contributor
Bronze Contributor

Hello,

 

Apart from modifying every tag template, is there a way to cut these lines of code on every tags ?

Like a "No Ecommerce" global option ?

Some of my collegues are very sensitive to performance issues and would like to avoid running these lines if not necessary (every little helps you know ;) ).

        // automatically fires Purchase tracking if an order ID is present
        if (u.data.order_id) {
          tracked_purchase = true;
          event_data.orderId = u.data.order_id;
          event_data.orderValue = u.data.order_subtotal;
          event_data.currency = u.data.order_currency;
          event_data = u.clearEmptyKeys(event_data);
          obApi("track","Purchase",event_data);
        }

        for (j = 0; j < u.data.event.length; j++) {
          // prevents duplicate purchase tracking, but allows explicitly set Purchase tracking in situations where an order ID may not be present
          if (u.data.event[j] === "Purchase" && !tracked_purchase) {
            tracked_purchase = true;
            event_data.orderId = u.data[u.data.event[j]].order_id || u.data.order_id;
            event_data.orderValue = u.data[u.data.event[j]].order_subtotal || u.data.order_subtotal;
            event_data.currency = u.data[u.data.event[j]].order_currency || u.data.order_currency || "USD";
          }
          event_data = u.clearEmptyKeys(u.data[u.data.event[j]]);
          if (utag.ut.isEmptyObject(u.data[u.data.event[j]])) {
            obApi("track",u.data.event[j]);
          } else {
            obApi("track",u.data.event[j],u.data[u.data.event[j]]);
          }
        }

Regards,

Guillaume

Guillaume
2 REPLIES 2

Tags without Ecommerce trigger and js code

Tealium Expert
Tealium Expert

Hi Guillaume,

I suspect the code might be part of the tag template. If that is the case, the best way would be to remove it from tag template as you mentioned. I would also check if there is a UI level configuration or boolean flag, that could disable this part.

Which Tealium IQ tag are we discussing here?.

I can take a look at the tag and see if there is any other configurations that can help disable the ecommerce part.

If there is no way to handle this usecase, probably recommend raising this as a "Product Idea".

Thanks 

Abraham

Thanks & Regards
--------------------------------------------------
Abraham Easo
Principal Consultant
Numeric Analytics, LLC
Bartlett, IL (CST)
m: 980-422-2044
Abraham.Easo@numericanalytics.com | http://www.numericanalytics.com
Adobe Analytics Architect/Tealium Expert/Ensighten/Google Analytics Certified

Tags without Ecommerce trigger and js code

Bronze Contributor
Bronze Contributor

Hello Abraham,

Thanks for your answer. We are talking about all tealium tags.

I agree with you, it might be a part of all tag templates by default.

I was not able to find a radio button or boolean flag that coul disable this part within the UI.

I guess the next step is the "Product Idea" section ;)

Regards,

Guillaume 

 

Guillaume
Public