Highlighted

question about fireing specific tags via utag.link

Rookie Contributor

Hi,

Suppose you have follow scenario you have two google analytic tag's with two different tracking ids defined for the site in tealium. We will call them videoGa en otherGa. What I want to do is when calling utag.link and that can choose witch tag is fired. According to this document

https://community.tealiumiq.com/t5/Developers/utag-link-and-utag-view/m-p/75#link

we can call utag.link and the last parameter can be an array tags ids but this can only be done from version 4.36 and we are on version ut4.011.

 

utag.link({ "event_name":"cart_add", "product_id":["12345"], "product_name":["Lucky Shirt"] }, function(){alert("Only fired tags 1 and 2 with this call");}, [1,2]);

Another thing is that we want to avoid to hardcode the tag id's in our javascript. Is there no other way to do this instead we would like to handle this in telium. So that we just call utag.link and then decide what witch tag must be called.

1 REPLY 1
Highlighted

question about fireing specific tags via utag.link

Employee Emeritus

@geoffrey_samper, you can use load rules to determine when a tag will Load/Fire.

 

And you can also use "return false" to block a tag from firing.

 

Start with Load Rules, if that does not get you all the way there, then use the "return false" concept.

 

// when event_name equals cart_add then block the tag from firing
if(b['event_name']==='cart_add'){ return false; }

tmp-google-20151130T153313.png

 

Let us know how this works out.


Brian