Reply
Highlighted
Visitor
Posts: 2
Registered: ‎04-11-2018
Accepted Solution

Preventing all tags and extensions from firing on unwanted utag.link request

Hi all - allow me to jump right into it: 

The case revolves around an unwanted utag.link request holding incorrect/redundant/useless information. Let's call it:

utag.link({
	whoops:"not again"
});

As it's mentioned in several threads, we can ensure that the implemented tags aren't fired in this particular case either by (1) configuring a load rule to exclude this tracking request and applying this to the relevant tags individually or by (2) creating a JS extension with tag specific scoping in which it will conditionally 'return false' so the given tag won't run.

What I'm looking for, though, is a simple method to (3) prevent all tags and all subsequently loaded extensions from firing in case of the above utag.link request, which may take weeks or events months to have erased from the datalayer implementation due to matters like other development processes and business priorities. 

In other words; is there a function/metod to prevent all further Tealium processing when an erroneous utag.link request is detected?

If anything in the above use case is unclear, please let me know and I'll elaborate. 

Thanks in advance for your inputs - much appreciated :) 

 

Reply
0 Kudos
Occasional Contributor
Posts: 113
Registered: ‎12-11-2015

Re: Preventing all tags and extensions from firing on unwanted utag.link request

The easiest way is probably to intercept utag.link requests. And the easiest way to do that is to create a custom tag template, bundle it (so that it runs at the bottom of utag.js), and have it do the following:

window.utag.link_old = window.utag.link;
window.utag.link = function(a,b,c){
  if(a.whoops == "not again"){
    // do nothing with this data
  } else {
    this.link_old(a,b,c);
  }
};

That will prevent the event handlers actually being invoked, and so prevent any extensions from running or tags firing.

Visitor
Posts: 2
Registered: ‎04-11-2018

Re: Preventing all tags and extensions from firing on unwanted utag.link request

Wonderful! Tested this and it seems to work perfectly! Really appreciate the quick response :)
Reply
0 Kudos