AdWords
3.6K members online now
3.6K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Countdown Customizer - Daily Events

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Everyone.. 

 

I'm trying to set-up an Ad that counts down each day (Monday-Friday) to a set time (20:00)

 

Eg; 

 

This is My Headline

Some Other Text Goes Here

You Have "XX Hours" Left To View

http://www.domain.com/disp_url

 

I understand if it was a 1-off event i can use {=COUNTDOWN("YYYY/MM/DD  HH:MM: SS")}

But for recurring events i need to use a data file.. 

 

Now the examples on Adwords Help don't explain the "Countdown" parameters very well..

 

What i am wanting to know is what columns to put in my data file for each days event???

I dont need to display the Day parameter, just the countdown time left..

 

Eg;

Column 1     Column 2

Monday         YYYY/MM/DD 20:00:00

Tuesday        YYYY/MM/DD 20:00:00

Wednesday    YYYY/MM/DD 20:00:00

Thursday       YYYY/MM/DD 20:00:00

Friday            YYYY/MM/DD 20:00:00

 

Any help would be appreciated.. Thank you.

2 Expert replyverified_user

Re: Countdown Customizer - Daily Events

Top Contributor
# 2
Top Contributor
Hi Richard,

It's a good question and something that I haven't personally addressed yet myself but I thought of a potential workaround...

How about for Column 1 you have each field listed as "You Have" as opposed to the Weekday names. Then simply use a parameter to insert the Column 1 text into the start of the second description line so in reality "You Have" is just being inserted in the correct position each time?

ScottyD, AdWords Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Countdown Customizer - Daily Events

[ Edited ]
Top Contributor Alumni
# 3
Top Contributor Alumni

Hi Richard,

Welcome to the AdWords Community!

 

You're right - not a ton of info on how to use the customizers.  This is a very good question; here's how I'd approach - I'd set up a separate Campaign for each day of the week using Ad Scheduling.  Then for each day I'd do a count-down to a one-time event.  To do this, you fortunately do not need to setup a data file.  You'll just add {=COUNTDOWN("YYYY/MM/DD HH:MMSmiley FrustratedS")} to your Ad Text

 

The only problem with this way is I think you'll have to update the Countdown dates every week, but it should still save you time by not having to edit your Ads hour by hour.

 

I think this will work, but to be honest I'm not 100% sure.

 

 

 

Re: Countdown Customizer - Daily Events

Top Contributor
# 4
Top Contributor

Hi Richard,

 

The easiest way to do this is, as always, with Scripts!  Create your Ad(s) using customisation parameters, e.g.

 

This is My Headline

Some Other Text Goes Here

{param1:This is the Default Text}

http://www.domain.com/disp_url

 

Then use the following script, running hourly:

 

// Script to count down to an hour of the day
// Time to count down to
var END_TIME = 20;

function main() {
var now = new Date(Utilities.formatDate(new Date(), AdWordsApp.currentAccount().getTimeZone(), "MMM dd,yyyy HH:mm:ss"));
var hoursNow = now.getHours();
var hoursLeft = END_TIME - hoursNow;

hoursLeft = Math.floor(hoursLeft);

var paramText = "You Have " + hoursLeft + " Hours Left to View";
if(hoursLeft < 0) {
paramText = "Sorry, You'll need to wait until tomorrow.";
}
Logger.log(paramText);

var groupIter = AdWordsApp.adGroups()
.withCondition("CampaignName = 'your_campaign_name'")
.withCondition("Status = 'ENABLED'")
.get();

while(groupIter.hasNext()) {
var thisGroup = groupIter.next();
var keywords = thisGroup.keywords().get();
while (keywords.hasNext()) {
var keyword = keywords.next();
keyword.setAdParam(1, paramText);
}
}
}

 

This script works with just a single Campaign, and you'll need to edit it to put your own Campaign name in.  If you want it to work across multiple Campaigns, you'll do better to use Labels and/or a naming convention and different .withCondition for the Campaign.

 

As always, please PREVIEW the Script before setting it to run, it should output the line for the Ad in the Logger pane.  If it's correct, set the script to run hourly and you're done.  To ensure the Ads don't show after 20:00, or on Saturday/Sunday you could either use Ad Scheduling in a specific Campaign, or use Automated Rules & Labels to enable and disable them.

 

I've configured the Script to check if the time is beyond 20:00 and, if so, replace the text with another message; this is probably a good idea as you may not be able to guarantee the Ads will stop running at precisely 20:00...

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: Countdown Customizer - Daily Events

Top Contributor Alumni
# 5
Top Contributor Alumni

@Jon_Gritton great answer!  I feel so basic.

Re: Countdown Customizer - Daily Events

Top Contributor
# 6
Top Contributor
You're definitely not alone Brian hahah.

ScottyD, AdWords Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: Countdown Customizer - Daily Events

Top Contributor
# 7
Top Contributor

As an afterthought, it'd be a nice idea to add an extra condition beneath the line that checks for the hours being <0, as follows:

 

if(hoursLeft == 1) {
paramText = "Hurry, Only an Hour Left to View.";

}

 

(Obviously, use any paramText you want).  This will give a last minute incentive and avoid the poor English of saying "1 hours".

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: Countdown Customizer - Daily Events

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Hi Jon,

Thank you for your help and explanations, it does look like a script is my way to go.

Ive never dealt with running scripts before so ill carefully give this a go once ive done a little research on them.

i have a couple of questions..

In terms of Description line Char Limits (35) - I presume these still come into play with the Param text i choose?

Can i edit the following just to output the number of hours ie; 1 or 9 or 12 etc
var paramText = "You Have " + hoursLeft + " Hours Left to View";

So my Ad can have static text and dynamically add the param when running?
eg: "Want to View Today? Only {param1} Hrs Left"


Rich.

Re: Countdown Customizer - Daily Events

Top Contributor
# 9
Top Contributor
Hi Richard, yes, the character limits still always apply and yes, you could change that line (and the Ad) as you've suggested to alter only the actual hours figure. Note though, this will leave you for the hour before 20:00 with your Ad saying "only 1 hrs left". It's a small point, but personally I'd still put the "hrs" bit into the param, and use a condition to change it to "hr" when the hours figure is 1.

Note that you will always require default text in your {param} so you'll need to consider what that should be, and how it will fit with the rest of the text in the line.

Jon
AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: Countdown Customizer - Daily Events

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

Hi Jon, 

 

After breaking down the script to try understand each fuction etc and filling in my details, i loaded the script and ran a preview, in the preview log it outputted the correct line, "You Have 10 Hours Left to View"..

 

I changed the time to after the deadline and it changed correctly "Sorry, You'll need to wait until tomorrow."

 

But i have noticed in the "Changes" preview i get the following. (there is 100 lines of this)

 

Changes Preview

changeserror.JPG

 

If i run the script, the log file outputs this error - Value is too long

 

Now.. if I use extra conditions like AdGroupName and LabelNames, as i have 2 ad groups and 4 Ad's in each (one has the Param string) - this has the label (the others dont)

 

var groupIter = AdWordsApp.adGroups()
.withCondition("CampaignName = 'my_campaign_name'")

.withCondition("AdGroupName = 'my_adgroup_name'")
.withCondition("Status = 'ENABLED'")

.withCondition("LabelNames = 'AdCountdownView'")
.get();

 

I get the same log output (showing the correct line), but there is no changes.. 

 

Is this correctly working? even though there are no changes..