- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-29-2015 09:17 AM
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
10-29-2015 12:25 PM
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.
Also I would be interested to hear how others might solve for this scenario.
Brian
01-11-2016 05:53 AM
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:
01-11-2016 11:04 AM
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
01-12-2016 02:31 AM
Hi @adrian_browning,
thanks for your help! It worked and now I'm able to exclude the pages with Redirect from the tracking.
Copyright All Rights Reserved © 2008-2023