Disabling calls (view & link) on selected pages for all tags (except specific ones)

Bronze Contributor
Bronze Contributor

Looking for a solution simillar to setting a noload flag for specific pages. The twist in coparisson to the noload flag is however that a few set of select tags should be excluded from the ruleset. Is this possible to solve in a simillar way to setting the noload flag?

Kind regards
Mikael

4 REPLIES 4

Disabling calls (view & link) on selected pages for all tags (except specific ones)

Employee Emeritus

Mikael
Here is one way to solve the scenario you have presented. To use this solution, you will need utag version 4.38 or greater. To find the version of utag, run utag.cfg.v in the browser debug console or run "Tag Status Checker" in TiQ. Then use Lookup Table Extension that runs "Before Load Rules" and add a new Load Rule that looks at this value. If you want to Block a tag, you would add this Load Rule to the Tag in addition to the Load Rule you are already using.

The Lookup Table Extension needs to be set to run "Before Load Rules" and will create a new key value pair in utag.data. Let's call this key block_tags and the value will by default be "run" however if there is a match in the lookup table, then the value of block_tags will be "block" and will now block tags from loading.

The Load Rule will be called "Block Tag" and the rule is:
if block_tags equals "run"

Now let's assume you have tags that only load on the product detail page. You might be calling this Load Rule "Product Detail Page" and the rule is:
if page_type equals "product"

If you want to block some tags on the Product Detail Pages and not others you would apply the Product Detail Page load rule to all of these tags. However the ones that you want to block, you would also apply the Block Tag Load Rule.

tmp-lookup-20150929T095959.png

Also I would be interested to hear how others might solve for this scenario.

Brian

Disabling calls (view & link) on selected pages for all tags (except specific ones)

Bronze Contributor
Bronze Contributor

I tried to implement something similar, but unfortunately didn't succeed yet.

Maybe you can help on this.

 

In my case, I have some pages on the website whith a client side redirect to the homepage (<meta name="Redirect" content="0; URL=https://website.com/Home" http-equiv="refresh" />).

 

I wanted via JS to retrieve this information, set a Data Layer Attribute, and trigger my Webanalytics Tag only on pages without redirect.

 

Step 1: I added a JS Attribute called disableTracking.

 

Step 2: I added a JS Extension with Execution Bofore Loading Rules with scope on All Tags

 

redirect = document.getElementsByName("Redirect")[0];
b.disableTracking = "run";
if (typeof redirect != 'undefined'){
	b.disableTracking = "block";
}
console.log(b.disableTracking);


The output in the console is also working well and I get run or block as expected.

 

Step 3: I created a loading rule to trigger the Analytics tag on this condition:

js_page.disableTracking EQUALS run
 
The principle is bacially the same as with the lookup-table, but I set the attribute via JS.
 
Any Idea why it's not working? Thanks for your help :)

Disabling calls (view & link) on selected pages for all tags (except specific ones)

Tealium Employee

Hi @Stevs

 

So I think the issue you have is that you are using a JS attribute, and not a UDO variable.

Because you are assiging directly to the b object,

 

b.disableTracking = "run";

That would be classed as a UDO Var, not JS page.

 

Hope this helps.

 

Adrian

 

 

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Disabling calls (view & link) on selected pages for all tags (except specific ones)

Bronze Contributor
Bronze Contributor

Hi @adrian_browning,

 

thanks for your help! It worked and now I'm able to exclude the pages with Redirect from the tracking.

Public