ROAST the Competition with Goals and Google Ads

ROAST the Competition with Goals and Google Ads

John Campbell • 31/05/2024

In the ever-evolving world of digital marketing, staying ahead of the competition requires creativity and the ability to leverage data effectively. One powerful way to do this is by using scripts in Google Ads to make real-time adjustments to your campaigns, based on external data.

Using scripts avoids manual work of turning ads on or off which takes time, and such work can tend to be out of office hours.

This blog post will walk you through a practical example of how to use a script to dynamically manage your ad groups based on the outcome of a football match, with the UEFA Euro’s 2024 coming up we thought this could be a great example, however as you’ll see the limitations of using the inbuild script system in AdWords.

What the Script Does

The script fetches the latest match data from a specified URL (we are using the JSON files that power the website) and determines if England is the home or away team. Based on the match status and score, it enables or disables specific ad groups within your campaign. If the match is finished, the script logs a message and makes no changes.

Why would you want to use such a script?

In this hypothetical example let’s pretend we are running an account for a Pizza delivery service and they have an offer related to the score in the big match. They have a big offer for the match but they want the ad copy to match what’s happening in the game.

For this, we need three versions of the ad copy to cover winning, drawing and losing.


England Win


England Draw


England Loss

This could be extended to a full-time win, lose, draw, penalties win etc. You must consider all the different possibilities of combination and have a backup ad copy in case there is a combination you didn’t plan for.

Why This Script is Useful:

  1. Real-Time Campaign Optimisation: Automatically adjust your ads based on live events, ensuring that your campaign remains relevant and engaging.
  2. Increased Efficiency: Save time and reduce manual intervention by automating ad group management. This example is just one match, however, imagine if you had to run this campaign for every match over a 6-week period for multiple times a day, over multiple languages. This is where you can start to save time and avoid any human mistakes.
  3. Enhanced Relevance: Display ads that are more likely to resonate with your audience by aligning them with current events.

What You Need to Set Up in AdWords

  1. Campaign and Ad Groups: Create a campaign named “Euros_Promotion_2024”. Set up the following ad groups.
    • England Winning
    • England Losing
    • England Drawing

Adding the Script and Scheduling it to Run Every Hour

    1. Open Google Ads:
      • Log in to your Google Ads account, use the same account as above.
    2. . Create a New Script:
      • Navigate to the “Tools & Settings” menu.
      • Under the “Bulk Actions” section, click on “Scripts.”
      • Click the “+” button to create a new script.
    3. Add the Script:
      • Copy and paste the following script into the script editor: Script here. – Make sure to update the URL for the game, ad the ids for the campaign and AD Groups


4. Authorize and Preview:

  • Click the “Authorize” button to allow the script to access the necessary Google Ads services.
  • Click the “Preview” button to test the script and check the logs.

5. Schedule the Script:

  • Once you’ve verified that the script works correctly, click the “Schedule” button.
  • Set the script to run every hour to ensure it operates within Google’s execution time limits while checking and updating ad groups in near real-time.


We mentioned the limitations of running script on AdWords, here we hit one.


AdWords only allows you to schedule scripts to run once an hour, ideally, this script would run every five minutes. A little hack we’ve added to the script keeps it running for 30 minutes (which is the maximum execution time for a script in AdWords). If you needed to run on a higher frequency, you could run externally e.g. in a Google Cloud Function which would require additional authorisation.

Once the script is running, we can see the actions using the script history.

Here we can see the script run, as England (we used the England under 17 team who were playing Italy as a test). When the team concedes a goal to change the score to 1-1 the script enables the England drawing Ad Group.

Script Details

This example explains the basic theory around how scripts can be used to make changes on your account using external sources.

Other Examples of Using External Data to Make Changes to Your AdWords Campaigns

  1. Weather Conditions: Adjust bids and ad copies based on weather data. For instance, promote waterproof clothing on rainy days.
  2. Stock Levels: Automatically pause ads for products that are out of stock and enable them when stock is replenished.
  3. Social Media Trends: Use trending hashtags or topics from social media to adjust your ad copy dynamically.
  4. Economic Indicators: Adjust your campaigns based on economic data such as consumer confidence indices or stock market performance.
  5. Competitor Analysis: Monitor competitors’ ads and adjust your bids and ad copies accordingly.


Using external data to optimize your Google Ads campaigns can significantly enhance their relevance and effectiveness. By automating ad group management based on live events, you can ensure your ads remain timely and engaging, ultimately driving better results.

View the ROAST Euros Google AdWords Script here.

If you are interested in how scripts and automation can help you run your Google AdWords account, reach out to our ROAST Labs team.