• About Us
  • Contributors
  • Guides
  • Speaking Engagements
  • Write for The SEM Post
  • Submit a tip or contact us!
  • Newsletters

The SEM Post

Latest News About SEO, SEM, PPC & Search Engines

  • Google
  • SEO
  • Mobile
  • Local
  • Bing
  • Pay Per Click
  • Facebook
  • Twitter
  • State of the Industry
You are here: Home / Google / Why the Advanced AdWords Certification Exam Made Me Write An AdWords Happy Hour Script

Why the Advanced AdWords Certification Exam Made Me Write An AdWords Happy Hour Script

August 4, 2014 at 5:30 am PST By Steve Hammer

  • Facebook
  • Twitter
  • Google+
  • Pinterest
  • LinkedIn
  • Email
  • WhatsApp
  • Evernote
  • SMS

adwords certificationIf the Google Adwords Advanced Certification test hadn’t been multiple choice, I might have failed it. If they had allowed free form answers, I would have taken a very different approach from the answer they wanted to hear.

Of course my common answer was to use scripts, and there wasn’t a single question for which that was the right answer. In fact, I don’t even recall a question where scripts was a possible answer. By comparison, you are expected to know information about API usage, a very complicated process best suited for professional programmers, not just advanced Adwords practitioners.

Personally, I think it’s a huge miss on Google’s part.   Adwords scripts can accomplish fairly simple, elegant solutions to routine problems.

Let’s take for example the concept of ad scheduling. It’s an important concept for anything that’s time sensitive. The common use case is to completely stop showing a campaign during times that are not appropriate. This works great if there’s only on or off that matter.

But imagine the case of a restaurant that wants to promote happy hour and lunch specials. Using just ad schedules, it would need two separate campaigns with two separate schedules. If they always wanted to run a “base” conversion campaign as well they’d need three. Maintenance is now three times as complicated, and data is stretched extremely thin and hard to aggregate. It’s also easy to lose control of budgets unless also employing a shared one between the three. It’s kludgy to say the least.

stevehammer1However scripts can elegantly solve this task by turning on and off ads via labels, but keeping the remainder of the account structure intact.

First we need to label our ads, which is easiest to do within the interface. In this example we could call them “HH” or “Lunch”. Our ad group iterator can then use a condition to select based upon these labels and pause or enable the campaign. To keep the logic simple we can employ separate scripts for each “switch” and not have to have any complicated if then statements or time lookups.

Stating it in my typical framework of what we want to accomplish sounds like this: “Enable ads labeled ‘HH’ and pause those without that label when we run this script everyday around 4 o clock.” The framework telling me that I need to selected based upon Label Names and iterate through them to pause or enable as needed. It’s also telling me to schedule the script.

In code, it looks like this:

var CAMPAIGN_NAME = ‘Chotchkies’;

function main() {

// Set Lables as appropriate

pauseAdsWithLabel(“Lunch”);

enableAdsWithLabel(“HH”);

}

function enableAdsWithLabel(eLabel) {

var adsIterator = AdWordsApp.ads()

// condition could also be STARTS_WITH instead of =

.withCondition(“LabelNames = ‘” + eLabel + “‘”)

.get();

while (adsIterator.hasNext()) {

var ad = adsIterator.next();

ad.enable();

}

}

function pauseAdsWithLabel(pLabel) {

var adsIterator = AdWordsApp.ads()

.withCondition(“LabelNames = ‘” + pLabel + “‘”)

.get();

while (adsIterator.hasNext()) {

var ad = adsIterator.next();

ad.pause();

}

}

A few notes on the code.

First, I don’t actually use the campaign name anywhere in the code, but needed to slip in an Office Space reference somehow. As a result the script traverses the entire account. It’s very possible to actually use a campaign name condition or even an ad group condition to limit the scope.

Second, There’s no need to do anything schedule the script to run when the switch needs to happen on a daily basis. I’d recommend scheduling a copy of the script to run when the events need to reverse, since it’s much easier than trying to add the time logic needed for an hourly run.

Third, there are other ways to accomplish this same task. It’s possible to use a label class and have it return an ads iterator. It might be more “elegant” that way, but much harder to explain. So ignore this part unless you are a real programmer and want to show off.

Finally – Scheduling scripts. This Google makes super easy. In bulk operations, right next to where the script was created, there’s a plainly labeled link to “create schedule”.

stevehammer2To wrap up – you don’t need to know scripts to pass the Adwords exams (yet?), but if you do know them, I think the answers are better than the ones they want you to select.

  • Facebook
  • Twitter
  • Google+
  • Pinterest
  • LinkedIn
  • Email
  • WhatsApp
  • Evernote
  • SMS
The following two tabs change content below.
  • Bio
  • Latest Posts
My Twitter profileMy Google+ profile

Steve Hammer

President & Co-Founder at Rank Hammer
Steve Hammer is President and co-founder of RankHammer, a full service search marketing agency in Dallas, Texas. Steve's experience in online media and traditional marketing allows a strategic and long-term view of search marketing. He has achieved extraordinary and sustainable results in several competitive online industries often exceeding growth rates in excess of 50% per year. Prior to RankHammer, Steve held a number of exemplary positions including Director of Search Marketing for ACE Cash Express, General Manager for Stir, and a practicing Chemical Engineer for BASF. He holds a MBA from the prestigious Kellogg School of Management. Steve is very active in the Dallas and Search Marketing community, as a former VP on the DFWSEM. He has spoken at numerous meetings and conferences including SES, ClickZLive, SMX Advanced, State of Search, Pubcon, and Interactive Insights Summit.
My Twitter profileMy Google+ profile

Latest posts by Steve Hammer (see all)

  • Overcoming AdWords Conversion Data Discrepancies - February 12, 2015
  • Near Exact Match Monitoring AdWords Script - August 15, 2014
  • Why the Advanced AdWords Certification Exam Made Me Write An AdWords Happy Hour Script - August 4, 2014

Filed Under: Google, Pay Per Click Tagged With: AdWords scripts, Google AdWords

Sign up for our newsletter


Founder & Editor

Jennifer Slegg (2051)

Sign up for our daily news recap & weekly newsletter.


Follow us online

  • Facebook
  • Google+
  • Linkedin
  • Pinterest
  • Twitter

Latest News

Google Quality Rater Guidelines: The Low Quality 2021 Update

Google has released a new version of the Google quality rater guidelines, a year after the last … [Read More...]

Recent Posts

  • Google Quality Rater Guidelines: The Low Quality 2021 Update
  • Rethinking Affiliate Sites With Google’s Product Review Update
  • New Google Quality Rater Guidelines, Update Adds Emphasis on Needs Met
  • Google Updates Experiment Statistics for Quality Raters
  • Analyzing “How Google Search Works” Changes from Google
  • Google Quality Rater Guidelines Update: New Introduction, Rater Bias & Political Affiliations
  • Google Updates Quality Rater Guidelines: Reputation for News Sites; Video Content Updates; Quality for Information Sites
  • Google Makes Major Changes to NoFollow, Adds Sponsored & UGC Tags
  • Google Updates Quality Rater Guidelines Targeting E-A-T, Page Quality & Interstitials
  • Google Local Service Ads Display Pricing Estimates for Specific Locations

Categories

  • Affiliate Marketing
  • Amazon
  • Apple
  • Bing
  • Branding
  • Browsers
  • Chrome
  • Content Marketing
  • Design
  • Domains
  • DuckDuckGo
  • Email
  • Facebook
  • Firefox
  • Foursquare
  • Google
    • Analytics
    • Google RankBrain
    • Quality Rater's Guidelines
  • History of Search
  • Industry Spotlight
  • Instagram
  • Internet Explorer
  • Links
  • Local
  • Mobile
  • Native Advertising
  • Other Search Engines
  • Pay Per Click
  • Pinterest
  • Publishers
  • Security
  • SEO
  • Snapchat
  • Social Media
  • State of the Industry
  • The SEM Post
  • Tools
  • Twitter
  • Uncategorized
  • User Experience
  • Video Marketing
  • Week in Review
  • Whitepapers
  • Wordpress
  • Yahoo
  • Yelp
  • YouTube
May 2022
MTWTFSS
« Oct  
 1
2345678
9101112131415
16171819202122
23242526272829
3031 

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2022 · News Pro Theme On Genesis Framework · WordPress · Log in