Last active
April 18, 2016 14:20
-
-
Save 33sticks/65df4ed58b82f0af5ec1 to your computer and use it in GitHub Desktop.
A template to manage marketing tags/pixels in DTM with a date comparison to kill pixels that are outside of campaign flight dates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ACTION REQUIRED: TAG CONFIGURATION | |
var killDate = new Date("MM/DD/YYYY"); //INPUT CAMPAIGN END DATE | |
var vendorName = ""; //INPUT NAME OF MARKETING VENDOR | |
var requestNum = ""; //INPUT TRACKING REQUEST NUMBER | |
var tagName = ""; //INPUT NAME OF TAG/PIXEL | |
//Get current date and remove hours | |
var todaysDate = new Date(); | |
todaysDate.setHours(0,0,0,0); | |
killDate.setHours(0,0,0,0); | |
//Date check condition, tag only fires if the killDate is in the future | |
if (todaysDate <= killDate){ | |
//ACTION REQUIRED: INSERT MARKETING TAG HERE | |
//END MARKETING TAG | |
_satellite.notify(tagName + " tag (Request Number: " + requestNum + ") fired.",1); | |
}else { | |
_satellite.notify(tagName + " tag (Request Number: " + requestNum + ") has expired. Please remove from Adobe DTM.",4); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment