- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
07-22-2014 08:01 AM
Solved! Go to Solution.
07-22-2014 08:08 AM - last edited on 10-13-2015 09:13 AM by kathleen_jo
Hi Alessandro,
Could you use a load rule for this to prevent SiteCatalyst from loading on the URL in question? That would be the best way in my opinion, unless there's a good reason why the load rule will not do the job. Perhaps you can give us some more information on the problem?
There is also a way to prevent tags from firing by using a special javascript extension scoped to the tag, but I would only use this as a last resort; what you've described should be possible with load rules.
If you want to block all tags from loading on this particular page, you can wrap the "noview" option inside an if statement so that it only gets set on a particular url e.g.
if (window.location.pathname === "/home"){
window.utag_cfg_ovrd = window.utag_cfg_ovrd || {};
window.utag_cfg_ovrd.noview = true;
}
If you use this option, this code must be in an extension scoped to pre-loader.
Thanks,
Craig.
07-22-2014 08:21 AM
06-22-2015 06:53 AM
08-25-2015 11:57 PM - last edited on 10-13-2015 09:15 AM by kathleen_jo
Hi Jarno,
If you scope a JavaScript extension to a tag and the return value is a boolean false, it should prevent the tag from firing. For example:
if (window.location.pathname === "/home"){
return false;
}
08-26-2015 03:09 AM
07-02-2018 02:57 AM
07-02-2018 06:26 AM
Hi @meghashri,
Off the top of my head, you could use a pre-loader extension that conditionally sets:
window.utag_cfg_ovrd = window.utag_cfg_ovrd || {};
window.utag_cfg_ovrd.noview = true;
This should block the automatic utag.view event on page load, thus suppressing all tags by default.
Then you would need to fire a manual view, e.g. at DOM Ready, along the lines of:
utag.view(utag.data, null, [7]);
Where that third argument is an array which contains the tag IDs of the tags you want to fire (in this case, the one tag you don't want to suppress). The following caveats do apply:
07-03-2018 10:03 AM
@meghashri OOOOOooooo... I'd accept that as a solution! #hinthint #winkwink
Copyright All Rights Reserved © 2008-2023