How To Automate Bid Adjustments Using The AdWords Weather Script

google-weather
POST
jbudde-headshot
By Jess Budde
Share

So You Can't Control the Weather...

Are you a control freak? Do you relish the little things you have charge over and cringe at the thought of not being able to affect others? I am. I do. And this desire to maintain command comes out strong in PPC.

Nerdy perhaps, but nothing satisfies me more than the hands-on work involved in managing a campaign. And I seriously hate the idea of having my digital marketing diligence overshadowed by factors beyond my control, i.e. the weather! No matter how dialed-in your keyword bids are, no matter how high your quality scores, no matter how brilliant your ad copy, sometimes mother nature's mood swings trump all. A sudden rainstorm can mean curtains for open-air tour sales, and an unseasonably warm winter day yields huge potential for the community ice rink.

My point? Many businesses experience fluctuations based on the weather, and smart search advertisers know there's a need to adapt their strategy around it. Trouble is, things often change so quickly that bid management around weather is hardly something that can be tackled manually.

But there's good news! Weather (pun intended) you're looking to take advantage of certain conditions, or back off spends because of them, there's an AdWords script that has your back. That's right, you can modify your bids according to weather conditions. And we're not talking forecasts here, I mean automation based on actual, current weather data.

Implementation is pretty straightforward, but there are a lot of moving parts and it can become difficult if you don't have a firm grasp on them. The result is way worth it. Put a little effort into setup, and come away with an incredibly flexible system for automating bid adjustments based on the weather - one that can be adjusted, enabled, and disabled easily.

Wanna do this? Let's! First, the basics.

How Automated Bid Adjustments Work Using The Weather Script

We'll get technical in a minute, but before we dive into the implementation, it's important to understand the foundation of what we're doing here. You're going to access live weather data and use it to make bid adjustments in your campaigns - based on the conditions you define, in the locations you designate. You can then decide whether or not these adjustments apply to your entire campaign, or just to the folks in the physical location where the weather is happening.

To do this, you'll be running an AdWords script which is connected to a Google Spreadsheet. Once you pop the script into your account, you never have to touch it again, but that doesn't mean this is a set-it-and-forget-it operation. The spreadsheet is where the magic happens; you'll use it to dictate everything mentioned above, as well as to enable and/or disable individual bid adjustments. Think of it as your control panel.

This spreadsheet can be edited at any time, which means that you always have full control over the adjustments made by the script. You can add new campaigns, modify existing bid adjustments, and even change the criteria used to define your weather conditions - all without touching the script itself. It's pretty flippin' cool, so let's roll on.

Getting Started

Before you actually set anything up, there are a few things you should arm yourself with:

  • A Plan: hopefully you have some data that suggests weather indeed affects user interaction with your business, and how. Knowing which campaigns, targeting which locations, would benefit from weather-based bidding is essential for setup as you'll need to plug various pieces of information into the spreadsheet dictating the script's behavior (more on that later). You can add/subtract campaigns and locations as you go, but come armed with at least one fleshed-out plan to test.
  • Create Your Own Copy of this starter Google Doc: Google was amazing and created a template spreadsheet to help you get started! Head over to this link and create yourself a copy of their template. Be sure to copy the whole document, there are four sheets in there and you'll need them all.
  • API Key from OpenWeatherMap: this is where the weather data dictating your bid adjustments will be drawn from; you'll need to register for an API key to call weather data via the script. You can do so here. (The free version will do just fine!)
  • List of Weather Locations: for our purposes, the "weather location" is the place where the weather is happening - the place where the conditions will affect our bids. Refer to OpenWeatherMap's list of cities for the weather locations it uses when serving weather data. Pull the exact names of all the weather locations you want to use.
  • Geo Target Codes for Locations: AdWords targeting can be more granular than the locations used by OpenWeatherMap, so it defines locations differently. It uses what are called geo target codes to define locations. Grab the geo target codes that match your weather locations. Note that there might be multiple geo targets matching a single weather location - this is fine, just make note of all of them.

Got all of that? Perfect. Let's go!

Building the Spreadsheet

Friendly reminder: if you did not copy the template and save your own version, do so before proceeding.

The wonderful thing about this template is that it comes complete with its own set of instructions, right there in the first tab. Don't delete this, you'll likely find it useful later on as a quick reference. Now, you can either read those instructions, or follow along with me. (I've got more detail, you should stay here.)

Set Up Geo Target Mapping

  • Navigate to the last tab in the spreadsheet (labeled Geo Target Mapping). It is pre-populated with some sample data: delete the data.
  • Fill in Column A with the weather locations you pulled from OpenWeatherMap - remember, these are the locations where the weather is happening.
  • Fill in Column B with the geo target codes you found from the AdWords list that correspond with each weather location - if your weather location from OpenWeatherMap includes multiple geo target codes, create a new row for each unique geo target code. You'll then have multiple instances of the same weather location in your list; that's totally fine:

adwords weather script geo target mapping

Define Your Weather Conditions

  • Navigate to the tab in the spreadsheet labeled Weather Condition. It's pre-populated with sample data which is quite a helpful illustration of how this sheet works. Keep the samples around for a minute if you'd like, just don't forget to delete them before going live.
  • Go to work defining all the weather conditions you wish to trigger a bid adjustment for in your campaigns! Keep the following in mind:
    • All desired weather conditions should be added to this sheet, regardless of which campaign(s) they will be applied to. This is just a repository of all possible weather conditions you may use.
    • Since conditions can be applied across different campaigns, they do not need to be mutually exclusive (though keep overlap in mind when setting your bid adjustments later).
    • You can name the conditions (Column A) anything you want. Just stick to a method that makes sense to you, and do not give different conditions the same name.
    • The values input in Column B (temperature), C (precipitation), and D (wind) must adhere to one of three formats:
      • # to #  - inclusive
      • below # - not inclusive
      • above # - not inclusive
    • You do not need to enter criteria for all three columns in every condition, but there must be at least one.

A simple example might look like this:

adwords weather script weather conditions

Apply Bid Modifiers to Your Campaigns Based on Weather Conditions

This is the part where it all comes together.

  • Navigate to the tab in the spreadsheet that's labeled Campaigns. It's pre-populated with sample data that you probably don't need. Delete it now or later - just don't forget!
  • In Column A, enter the name of the campaign (exactly as it appears in AdWords) you want to apply a weather-based bid adjustment to.
  • In Column B, the weather location options you defined previously should be presented in a nice little drop down menu that appears when you click the cell - choose your location from it! If not, just type in the appropriate weather location exactly as it appears in the Geo Target Mapping sheet.
  • In Column C, the weather condition options you defined previously should also be presented in a nice little drop down menu that appears when you click the cell - pick the one you need! If not, just type in the appropriate weather condition exactly as it appears in the Weather Condition sheet.
  • Column D is where you enter the bid adjustment you'd like applied in the event of the weather matching your defined conditions. Unlike bid adjustments applied in AdWords, which are set as increases or decreases by a percentage, the modifiers here are entered as a multiplier of the bid. For example, if you want to decrease your bid by 50% if it's snowing, you'll enter 0.5. To increase by 30% in the sweltering heat, enter 1.3.
    • Remember, you can change these at any time if you find the modifiers are too drastic/not enough.
  • Column E is where you set the locations affected by the bid adjustments, and the settings can be a little confusing. You only have two options to select from here, but it's crucial that you select the right one - otherwise all of this work will be for naught (and could have unintended consequences). Your options are All Geo Targets and Matching Geo Targets, and they should appear in a drop down. Which one you want to use depends on your desired outcome.
    • Select All Geo Targets to apply the bid adjustment across all locations your campaign is targeting (this is the list of locations in your campaign settings within AdWords)
      • For example: Your campaign targets Buffalo, NY and Niagara Falls, NY and the weather location being used is Buffalo. If it's raining in Buffalo, bids will be adjusted in both Buffalo and Niagara Falls.
    • Select Matching Geo Targets to apply the bid adjustment only in the locations that match the weather location as you defined it.
      • For example: Your campaign targets Buffalo, NY and Niagara Falls, NY and the weather location being used is Buffalo. If it's raining in Buffalo, bids will be adjusted only in Buffalo. Bids will not be affected for users in Niagara Falls.
  • Finally, in Column F, you must indicate whether or not this bid adjustment rule should be enabled. Your options are simply Yes or No (which should appear as a drop down).
    • This is awesome because it means you can set different rules that make sense at different times of year, and can just toggle them on or off when the time comes. No deleting and reentering necessary!
  • You did it! Now repeat this process, adding a new row for every campaign/condition/adjustment combination you have planned. Your work will look something like this:

adwords_weather_script_campaigns_tab_example

 

Remember, you can come back and edit anything in the spreadsheet later. Work collaboratively with other account managers? Just grant them access to the document and boom, you can all contribute.

Did I mention how great this is for client approval, too? All you have to do is show them the spreadsheet and they'll know what you're up to. No need to type up a summary or run through complicated script code with them. Of course all of this is just icing on top of the cake that is automated, weather-based bid adjustments, but worth pointing out as I've personally found the accessibility of a Google Doc to be very useful in this scenario.

That being said, go forth with caution. You'll want to make sure you only share the document with the appropriate folks. Do not make the mistake of creating a public spreadsheet - if competitors get a hold of your ingenious plan, inclement weather will be the least of your worries.

That's it for the spreadsheet, and the hard part is over. You, my friend, are almost done!

Implement the Script

Yes! We're finally there. Grab the weather script from here (it's about a third of the way down the page, in the section labeled Source Code) and edit the following variables:

  • OPEN_WEATHER_MAP_API_KEY - REQUIRED - this is where you put the API key from OpenWeatherMap that I made you register for in the Getting Started section above
  • SPREADSHEET_URL - REQUIRED - this is, surprise surprise, where you put the URL of the spreadsheet you worked so hard on
  • TARGETING - OPTIONAL - this is an advanced feature that allows you to adjust the level at which your "matching geo targets" have to match (actual locations versus proximity - more details can be found in the full AdWords script documentation here)

Now all you have to do is add the script to your account and schedule it to run. This part is easy as pie, and if you've implemented a script before, you don't even need these instructions. Haven't done this yet? Here's how:

  • In your AdWords account, pop over to Bulk Operations (found in the left side navigation) and select Scripts
  • Create a new script by clicking on the red button labeled +SCRIPT

create_an_adwords_script

  • Paste in the script you've just edited, and give it a name
  • Make sure to PREVIEW it to double-check for errors (and fix any that crop up) - hit SAVE, to save your script
  • Once you've saved, schedule the script to run hourly, which is as often as is possible and ideal since the weather can change rapidly
    • The script running hourly simply means it's checking for weather conditions on an hourly basis - if there's no change in the weather, there'll be no change in your bids
      • Bid adjustments do not compound; meaning that if you set a 1.3 bid adjustment during sunshine and it's applied by the script, when the script runs again in an hour and it's still sunny, your bid will not go up another 30%, it simply stays at the elevated 30% level where it was before

And that's it! In the first few hours, you should check back often to make sure the script is functioning as you intended it to. Script activity can be found in the logs (located on the main scripts page), making it easy to check your work.

Consider Yourself a Weather-Based Bid Master

If you've followed the steps outlined above, you're well on your way to better-optimized campaigns through automated bids based on weather conditions. That being said, you might have questions! I know I did when I first set this up. Feel free to leave a note in the comments section below if you need some help or have tips to share with fellow search marketers.

Happy advertising, and may the force (of nature) be with you!

Categories: Paid Search Marketing
POST
jbudde-headshot
By Jess Budde
Share

1 Comment

  1. Author's Headshot
    Lincoln February 28, 2017
    Reply

    Hi, how would you set the campaign / or bid to off or zero if say the condition was not met?

Leave a Reply

Your email address will not be published. Required fields are marked *

Meet the Author

jbudde-headshot
Vice President of Marketing Operations & Client Services

Jess Budde

Jess is our Vice President of Marketing Operations and Client Service, and the co-host of our weekly Marketing O’Clock podcast. She joined Cypress North in 2013 and works out of our Buffalo office.

Jess works closely with both our clients and our internal team, overseeing account staffing to ensure client satisfaction. She co-manages our agency’s digital marketing department, works to facilitate cross-departmental collaboration internally, and acts as an account lead for a few of our clients. Jess also explores new opportunities for our existing clients and prospects.

A Western New York native, Jess graduated with a Bachelor of Arts in communication studies from Niagara University before attending Syracuse University, where she earned her master’s degree in television, radio, and film. Before joining Cypress North, she worked in series development, talent, and casting at MTV during the golden era with Jersey Shore.

When Jess isn’t working or staying up to date on the latest digital marketing news, she enjoys spending time outside, hanging out with her son, and watching the entire Sons of Anarchy series on repeat.  You may also find her slinging beers at Brewed & Bottled, the bottle shop and craft beer bar she runs with her husband.

Jess is an amateur ornithologist, Limp Bizkit lover, Candy Crush professional, and hot sauce connoisseur who enjoys burning herself into oblivion with the hottest sauce she can find.