Optimize Bids By Weather Using AdWords Scripts
It’s that time of year… drums please, summer summertime!” The time of year when the sun is shinning one minute and the next minute, rain is ruining your summer BBQ plans. If you have a product or service that is directly affected by the weather, this post is for you! The AdWords bid by weather script is simple to set up and allows you to optimize bids automatically based on geo-location and weather forecasts.
What type of account would bid by weather scripts work well for, you ask? How about golf courses that may want to bid more on a sunny day and decrease bids on a rainy day. Or a company that sells snow blowers or umbrellas? Changing bids manually based on the weather can be very time consuming and nearly impossible. This, my friends, is where weather scripts come in and save the day!
How It Works
The script first references a Google spreadsheet that has the campaigns and geo locations. Then, the script calls to the OpenWeatherMapAPI where it references current weather conditions for the locations specified in the spreadsheet and some basic rules. If the rule evaluates to be true, then the bid multipliers are applied to the campaigns specified. An example of a rule could be > if it’s sunny, increase bids by 10% for Ann Arbor, Michigan. You will specify what is considered “sunny” on another tab in the Google spreadsheet, which I will cover in more detail later on in this post. First, we will cover the basics.
- Register for an API key at the http://openweathermap.org/appid. *Make a note of your API Key. You will need this for the script.
- Make a copy of the bid by weather template spreadsheet located here
- Make sure the geo-locations are set on the AdWords campaigns you plan to use – *The script will not change geo-location of the campaign or fire if the location does not match.
- Identify weather locations according the OpenWeatherMap API. The location entered must match what is listed on the OpenWeatherMap API http://openweathermap.org/help/city_list.txt
- Gather a list of AdWords geo target codes based on location. Here is the complete list of geo target codes.
Creating The Google Spreadsheet
If you have downloaded and renamed the template listed above, next you will need to fill out the data in the Google spreadsheet. The Google spreadsheet includes three tabs – Campaign, Weather Conditions, Geo targeting mapping. Make sure that you take the time to ensure everything matches correctly to the OpenWeatherMap cities and Google geo codes otherwise the script won’t fire.
The campaign tab you will need to fill out the following information:
- Campaign name: The name of the campaign to be modified.
- Weather location: The location for which weather conditions should be checked.
- Weather condition: The weather condition for which this rule should be applied.
- Bid modifier: The location bid modifier to be applied if the weather condition is met.
- Enabled: Specify [yes] to enable a rule and [no] to disable it.
As you can see in the image above, you will need to determine what is considered “Sunny”. For example: Sunny = Temperature between 65 to 80 degrees Fahrenheit, Precipitation below 1mm of rain in the last 3 hours and wind less than 5mph.
If you leave cell blank, the value of that cell is not considered for calculation and will look something like this:
On this tab you will need to define and map the weather locations that are defined on the campaign tab. If you’ve already pulled this data from step 3 & 4 listed above you can just plug right into the spreadsheet. The two columns you will need to input the data are listed below:
Weather Location – This is a weather location name, as understood by the OpenWeatherMap API. You can find this data here
Geo target code: This is a geo target code, as understood by AdWords scripts. You can refer to https://developers.google.com/adwords/api/docs/appendix/geotargeting for a list of supported geo target codes.
You may need to list multiple geo-target code for a specific weather location because the weather location targeting is not as granular as the AdWords targeting. See example below.
You can find a copy of the bid by weather script here. Place the script in your AdWords account under: Bulk operations > Scripts. You will need to have your open weather API Key code and the link to your Google spreadsheet as mentioned below.
The script will read rules from all three sheets in order. If the data matches, the rule is executed and the bid modifiers are made. No changes will be made if the weather conditions do not match.
You can set up in AdWords how often you would like the script to fire and even go back and see what changes were made.
The overall set-up will take a little time to make sure all the data is entered correctly but once it’s set up, the script should save a ton of time and help your ads become more efficient if they are affected by the weather. Are you currently using bid by weather scripts for your account? How have they worked for you?
Browse By Category
New Sessions. New Networking. An All New Experience.
When we get feedback on ways to make Hero Conf more relevant, more actionable, and more meaningful, we take it pretty seriously. It's our most powerful tool in creating an event we believe helps our industry thrive. And we've used that information to build our...
Why Digital Marketing: Traditions Aren’t Always the Best
Explore how digital marketing can take your business goals to the next level and start expanding into new markets.
A bi-weekly newsletter packed full of resources and strategies that will help make you a better PPC expert.
Hanapin Marketing | The PPC Agency of Experts Behind PPC Hero
PPC Budgets: Pass Go into 2018 and Collect Optimal ROI
In this webinar, Shape CEO Jon Davis and Hanapin Director of Services Jeff Baum will share their expert advice about how you can perfect your 2018 budget strategy to achieve optimal ROI in the new year.
Setting Up and Analyzing Universal App Campaigns
Now that UAC adoption is mandatory for promoting an app on AdWords, it's important to compare Universal App Campaigns vs Mobile App Install Campaigns.
RStudio for PPC: A Beginner's Intro
A beginner's intro to using RSudio for PPC analysis and reporting.