@giacomo_ritucci you can also use some custom JavaScript. The code would look at a date range and compare it to the current date. Then, it will set a Boolean variable for the tag to load or not. The Boolean variable goes in a load rule and controls the loading of the tag. This code goes in an JavaScript Code extension scoped to pre-loader.
If you're interested in that approach, here's how to do it:
Add the Javascript Code extension from the extensions tab. T he Javascript Code extension is under the Advanced tab.
Change the scope to Pre Loader and add the code (found below) to the extension.
Add the variable name ( load_my_tag ) into Tealium from the Data Layer tab.
Create a new Load Rule that checks the value of load_my_tag and then assign it to the tag.
Test the result
Here's the code for the JavaScript Extension
utag_data = utag_data || {}; // Storing the value in utag_data, making sure it was defined
utag_data.load_my_tag = "1"; // Variable to use in the load rule, will need to create the variable in the Data Layer in Tealium too, 1 is true
var firstDate = new Date(2017,04,20); // YYYY, MM, DD Months are 0 - 11, January is 0
var secondDate = new Date(2017,04,25);
var today = new Date(); // Today's date
if ( today.getTime() > firstDate.getTime() && today.getTime() < secondDate.getTime() ) {
// If the variable today is past (greater than) the firstDate and before (less than)
// the secondDate do not load the tag
utag_data.load_my_tag = "0"; // Set to false
}
... View more