Analyze Best Performing Ad Copies With Google Ads Scripts

Digital marketers often grapple with vast amounts of data in search of actionable insights. One of the core components of a successful Google Ads campaign is the ad copy. Crafting compelling ad copy can significantly boost click-through rates (CTR), leading to more conversions and a better return on investment. But with multiple ads running across various ad groups, how do you quickly identify which ones are truly resonating with your audience? Enter the Google Ads Script: a tool that simplifies this complex task.

Functionality of the Google Ads Script:

At its heart, the Google Ads Script’s primary purpose is to sift through the sea of ads in your Google Ads account, identify the most effective ones based on CTR, and report the results. The script is designed to be both specific in its task and broad in its application, making it useful for accounts of varying sizes.

  • Setting Parameters: The script begins by setting a limit on the number of ads to process per ad group, labeled AD_COPY_LIMIT. This is a precautionary measure to ensure the script runs efficiently without being bogged down by processing too many ads at once. Users can adjust this number based on their needs.
  • Looping Through Ad Groups: The core of the Google Ads Script revolves around looping through every active ad group in the Google Ads account. An ad group contains one or more ads that target a shared set of keywords. By analyzing performance at the ad group level, the script ensures a more organized and targeted approach.
  • Gathering and Ranking Ads: For every ad group, the script gathers all the active ads. It then ranks these ads based on their CTR in descending order. The logic behind this is simple: a higher CTR typically indicates that the ad copy is resonating well with the target audience, compelling them to click on the ad.
  • Determining the Best-Performing Ad: Once the ads are ranked, the script identifies the top-performing ad copy within each ad group. This ad has the highest CTR and is deemed the most effective in engaging users.
  • Logging the Results: The findings aren’t just silently processed. The script logs the results, providing users with clear information on which ad copy is performing the best within each ad group. It reports both the headline of the top ad and its associated CTR, giving marketers a clear picture of what’s working.

Here’s how the Google Ads Script will work:

  • It will loop through all active ad groups in the account.
  • For each ad group, it will gather all the ads.
  • It will then rank these ads by CTR to determine the best performing ad copy.
  • The script will log the results.

Please note: Before running this Google Ads Script, you should have appropriate permissions in your Google Ads account and make sure you’ve set up the necessary API access.

Here’s a quick overview of what this script does:

  • It sets a limit on how many ads per ad group to analyze (for performance reasons).
  • It then loops through all active ad groups.
  • For each ad group, it grabs the ads, orders them by CTR in descending order, and then checks which ad has the highest CTR.
  • Finally, it logs the best performing ad copy along with its CTR.

Remember to test the script in a controlled environment before running it on your entire account to ensure it works as expected. Adjust the date range (“LAST_7_DAYS”) as needed based on your preference.

Benefits and Usage:

This Google Ads Script is a boon for marketers as it automates a typically tedious process. By quickly identifying the most effective ad copies, marketers can:

  • Replicate successful strategies across other ad groups or campaigns.
  • Reallocate budget to promote high-performing ads.
  • Refine or retire underperforming ad copies based on insights.

To deploy the script, users need appropriate permissions in their Google Ads account. It’s also crucial to test the script in a controlled setting before applying it account-wide. Adjustments, such as changing the date range for analysis, can be made to tailor the script to specific requirements.


In the fast-paced world of digital marketing, tools that simplify tasks and provide actionable insights are invaluable. This Google Ads Script is one such tool, offering a streamlined way to pinpoint the best-performing ad copies based on CTR. With this knowledge in hand, marketers are better equipped to optimize their campaigns, ensuring maximum engagement and returns.


Categorized as Scripts

Leave a comment

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