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 :)
... View more