November 13

AerisWeather How-To: Weather-Triggered Ads in Google Search and Display

In today’s competitive digital marketing environment, targeting has become more strategic and focused than ever across paid channels. Companies are switching to dynamic advertising triggers to minimize waste and deliver when demand for their products and services are at their peak. In many businesses, one of the largest drivers of demand is current weather conditions. From showing low fares for flights to sunny destinations in the dead of winter to SKUs for rain protection gear at a major retailer during a heavy downpour, AerisWeather has experience in helping companies optimize their advertising activity for any conditions Mother Nature may throw at you.

To help our clients capitalize on this experience, below we’ve built a script and provided a step-by-step guide to automating weather-triggered ads within Google Search and Display. Whether you’re a Paid Search Specialist looking to improve your company’s ad effectiveness or an agency looking to offer additional value to your customers the weather API will allow you to trigger the start and stop of campaigns based on current conditions, and schedule bid adjustments.

For this project, we have embedded the full length of the sample code for your ease of compilation and modification below:

Weather-Triggered Ads: Current Conditions

To use our Observations (current conditions) endpoint to fuel weather in your Google Ads, implement the following code in Google’s script manager tool, broken down for your convenience. Please note that beyond a short trial period, you’ll need to subscribe to an AerisWeather package that can support the volume needed for your daily ad impressions.

Step 1: Sign Up for an AerisWeather API developer account and begin building your script.

This code snippet covers the vital credentials necessary to access our API – minus the addition of your unique Client ID and Client Secret. Once you gather them from the “Apps” tab in your AerisWeather account, place them within the quotes where the variables are declared, it’s that easy!

Step 2: Limit the amount and type of data the API returns by providing the field and filter variables.

The following snippet calls the fields from the AerisWeather API that you specify.  If this is not specified, all available data will be returned. Additional fields are available in the AerisWeather documentation:

Step 3: Build your campaign management logic – setting conditions.

Below are just a few examples of methods you can use to call the API and make decisions based on the returned values. As mentioned, there are multiple fields you can call, but also a number of additional campaign adjustments available via Google Ads that can fit neatly into this script’s logic. Learn more about those from Google here.

 Example 1: Using the current temperature returned from the AerisWeather API

Example 2: Summary

Example 3: Dewpoint

Step 4: Campaign Automation in Response

While the above examples make the process of feeding info to logs apparent, below shows how to compare 2 different locations and adjust the campaign accordingly. With the following logic, we are adjusting ads for an imaginary brewery that has locations in Eden Prairie, MN and Sherman Oaks, CA.

Example 4: Getting Advanced with Bid Adjustments

Step 5: Call the API.

Now that you’ve built your logic using our examples and a little bit of Javascript know-how, we can call the API to return the fields we declared back in Step 2.

This part requires only a small amount of manipulation as the API returns data in a clean and uniform format each time it’s called.

To finalize the implementation of your weather-triggered ads Campaign Management Script, follow the instructions to authorize the script from Google’s documentation. Based on which campaigns or ad groups you set this script up to trigger, you can impact the efficiency of every ad you run.

There you have it! Within minutes you’ve now set up logic within Google Ads that lets you use weather as a status and bidding factor within your Google advertising stack.

Looking to get set up with AerisWeather? Sign up for a free trial of our Weather Data API and AMP (AerisWeather Mapping Platform) here or contact our sales team today!

Share this post:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.