Suppress tags from firing on page load

Gold Contributor
Gold Contributor

Hi Tealium Members,

I've a requirement where I need to fire an event tag to capture an informational message which displays on the page. But there is a functionality in the application where the page reloads after every 10 secs and as a result utag.js loads too. The requirement is not to fire the tag for subsequent page reloads. So, is there a way to achieve this like by suppressing the tags from firing subsequently on every page reload?

Any suggestion/solution would be much appreciated.

 

Thanks,

Sujay

3 REPLIES 3

Suppress tags from firing on page load

Tealium Expert
Tealium Expert

Hi @sujay_das 

You could add an extension scoped to the tag whcih sets a "do not fire" cookie.  Then add a load rule which stops the tag firing if that cookie is present.  You'd need to be a bit clever about the expiration of the cookie (or maybe have an extension that fires on every other page that removes it if it is present).

You could maybe use a window scoped JS object instead of a cookie, although you say the page is reloaded, so I'd guess that would mean the window object would get refreshed too.

HTH

Ben

Suppress tags from firing on page load

Gold Contributor
Gold Contributor

Hi Ben,

I like the idea of setting up the cookie and creating a load rule based on the cookie whether present or not but I'm not sure how to go about deciding the expiration of the cookie. Could you explain how to set this "do not fire" cookie.

To add more context, the application is being used by some agents and in a session there may be possibiltity that an agent wants to create another customer and can see the message in that process. So we want to make sure that the tag fires for the 2nd customer too and stop firing after every 10 secs if he stays on the page as the page reloads.

Thanks,

Sujay

Suppress tags from firing on page load

Tealium Expert
Tealium Expert
Using browser Local Storage might be easier than a cookie, as it is generally easier to delete stuff from local storage than removing a cookie.
Sounds like it is an internal app so I would think you could be confident about Local Storage being available and robust.
Public