How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Bronze Contributor
Bronze Contributor
We've got a ton of AJAX, so in general we configure as view:1 and link:1, but in reality, there are enough views that i'd like to suppress many tags from firing on large classes of views. For example, I need pretty much everything to fire on ATB, but we make a testing call on order thanks, and most tags should *not* fire twice there. Can I enable firing on views but suppress in specific cases?
5 REPLIES 5

How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Tealium Employee
Hi Henry, You can have a **tag scoped** JavaScript extension that has the following statement: {code:js} return false; {code} If you enclosed this in an if statement you can then have this trigger conditionally. The return false statement will then suppress that particular event on the scoped tag. so for example with AJAX you might have the following: {code:js} if(a == 'view' && url.indexOf('/update/')>-1){ return false; } {code} This would mean that on a view event and if the url for the AJAX request contained /update/ it would cause the tag to be suppressed from firing.

How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Bronze Contributor
Bronze Contributor
Exactly what I was hoping was do-able, I'll give this a shot. Thanks so much!

How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Tealium Employee
Hi Henry, If you are using v4.26+ of the utag.js then it might also be worth looking at your load rules, as they could be made more restrictive. This would only apply to view event but would save you having extra JS extension.
Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Bronze Contributor
Bronze Contributor
Fair point -- so in this case, the load rule would become something like all pages but also not( view and order thanks )? THat might be more useful in some cases.

How do I suppress a tag configured as u.ev={'view':1,'link':1}; from firing on certain views?

Tealium Employee
That's correct but just so you are aware, load rule re-evaluation will only happen on a view event, so you will still need to do the above JS for links or if you are using utag.track("xxxx",{}); method with a custom event name.
Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public