// Date to use to find out how many days are remaining. var END_DATE = new Date(‘June 2, 2014′); // Change this to the Ad Group you set up with text ads with AdParams. var AD_GROUP_NAME = ['Medicare Cost Report']; function main() var timeLeft = calculateTimeLeftUntil(END_DATE); var adGroup = getAdGroup(AD_GROUP_NAME); var keywords = adGroup.keywords().get(); while (keywords.hasNext()) var keyword = keywords.next(); // We want to update param1 to use our calculated days and param2 for hours. keyword.setAdParam(1, timeLeft['days']); keyword.setAdParam(2, timeLeft['hours']); var DAY_IN_MILLISECONDS = 1000*60*60*24; function calculateTimeLeftUntil(end) var current = new Date(); var timeLeft = ; var daysFloat = (end – current) / (DAY_IN_MILLISECONDS); timeLeft['days'] = Math.floor(daysFloat); timeLeft['hours'] = Math.floor(24 * (daysFloat – timeLeft['days'])); return timeLeft; function getAdGroup(name) var adGroupIterator = AdWordsApp.adGroups() .withCondition(‘Name = “‘ + name + ‘”‘) .withLimit(1) .get(); if (adGroupIterator.hasNext()) return adGroupIterator.next();
Just copy and paste that code into the script section. For your purposes you only need to modify two small details. First, you need to change the date to the time you want your countdown timer to run until and you need to tell the script which adgroup to run the timer within. There is a way to do this on a campaign level which you can read about in the Adwords Scripts documentation linked above. Now you will need to Authorize the script to access your account, and save the script. When you click save it will ask you if you want to preview it. This is a good idea because it will tell you if there are errors or not. If there are errors, there is an official Adwords scripts community that you can tap into for help. Once the script is saved you need to tell Adwords how often to run the script. Since my script countdowns by the hour, I set it to run once an hour. Here is how to do that. Once your script is saved and ready to run, you need to Click RUN to let Google know to start running the script. Finally, You need an ad that the script will modify, so you need to add ad parameters into your ad. Here is an example…
Only param1:a few days param2:and hours left!
Just like dynamic keyword insertion, you need to tell Google what to display if the countdown timer isn’t working. That’s what the text after the colons are. You’re all set . You can even check in the Ad Preview Tool if it’s working or not. What ideas can you think of for using the Ad Parameterizer feature? I bet there are some pretty creative ways to modify ads based on the news, or what’s going on in People’s lives, etc… Share your ideas in the Comments. I’ll get you started. 1. Countdown to a sale 2. Change ad by weather 3. change ad based on inventory 4. Change ad based on price 5. change special offer 6-100. ??? You Know What… I’ll Do You One Better Than Step By Step Instructions. I WILL DEPLOY THIS SCRIPT FOR YOU. Here, Let Me Do That For You. Why Would I do it for you? What’s the catch? You have to be willing to let me publish a case study of the results on Shoemoney. Click below if you are interested. Yes, Please Setup a Countdown Timer Adwords Script For Me.
How I Increased My Click Through Rate By 75% With A Dynamic Countdown Timer In Adwords