HomeBlogGrowthMy Golden List of Google Ads Scripts and the Reason Why

My Golden List of Google Ads Scripts and the Reason Why

Date:

Google Ads Scripts are essentially small programs written in JavaScript that allow you to automate tasks within your Google Ads account. Imagine having a robotic assistant that can handle repetitive or complex actions without human intervention. That’s precisely what scripts do.

In the list you will find below, I have included a descriptive punchline for each script, a mini description, and the final link to the redirected website where you can find more information, settings, and proposals to help yourself.

Since these scripts require some light coding knowledge, I would recommend implementing your desired scripts with assistance from a developer or experienced Martech guy.

First things first…

Why Google Ads scripts are they useful?

  • Efficiency: Automate time-consuming tasks like bid adjustments, keyword management, and report generation.
  • Accuracy: Reduce human error by letting scripts handle precise calculations and data manipulation.
  • Scalability: Manage multiple campaigns or accounts effortlessly with scripted automation.
  • Optimization: Implement advanced bidding strategies and data-driven optimizations based on performance metrics.
  • Customization: Tailor your Google Ads account to your specific needs and goals with custom scripts.
  • Essentially, Google Ads Scripts empowers you to focus on higher-level strategy and analysis while the scripts take care of routine management.

How to get started with Google Ads scripts

Prerequisites

  • A basic understanding of JavaScript.
  • A Google Ads account with manager access (for managing multiple accounts).

Steps to Create Your First Script

Access the Scripts Editor:

  • Log in to your Google Ads account.
  • Click on the Tools icon.
  • Select Bulk actions and then Scripts.

Create a New Script:

  • Click the + icon to create a new script.
  • Give your script a descriptive name.

Write Your Script:

  • Use the built-in editor to write your JavaScript code.
  • Google Ads provides a library of functions to interact with your account.
  • Start with a simple script to familiarize yourself with the environment. Here’s a basic example:
    function main() {
      var account = AdsApp.currentAccount();
      Logger.log('Account name: ' + account.getName());
    }

    This script simply logs the account name to the script’s execution log.

    Authorize Your Script:

    • When you run the script for the first time, you’ll be prompted to authorize it. This allows the script to access your Google Ads account on your behalf.

    Run and Test Your Script:

    • Click the Preview button to test your script without making changes to your account.
    • Once you’re confident, click the Run button to execute the script and apply changes.

    My Golden List of Google Ads Scripts

    I successfully implemented over 30 Google Ads scripts across over 80 Google Ads accounts. Based on the substantial value generated by these scripts, I have curated a selection of ten high-impact solutions tailored to diverse business needs and market conditions.

    Enjoy with caution!

    #1 Impact of Unknown Search Queries

    A quick insight into the number of impressions, clicks, and more from search terms that are no longer visible in accounts.

    Since September 2020, not all search terms are visible in Google Ads anymore, ostensibly for user privacy according to Google. This presents a significant challenge for PPC specialists because you have to make adjustments based on missing figures. Unfortunately, we cannot solve this problem with scripts either, but the script below does provide insight into the impact of these missing search terms in accounts.

    The script below is based on the Search Query Illuminator script from Smarter Ecommerce. You can apply this script at the MCC level. This allows you to quickly see, per account, which percentage of the impressions, clicks, costs, conversions, and conversion value can be attributed to unknown search terms. Although you cannot optimize better using this, you can use this to substantiate it towards (internal) stakeholders or during an initial analysis of an account.

    Source & code link: here.

    #2 Exclude Exact in DSA Campaign

    Automatically exclude all exact keywords in DSA campaigns. Search traffic will land in the most relevant ad group.

    Do you use DSA campaigns? You may be using DSA for keyword mining or to increase your impressions. If you have separate DSA campaigns in your account, it is recommended that you exclude all search terms that you have already advertised. Then your campaigns do not compete with each other and the search terms enter the ad group with the most relevant advertisements.

    This script helps you with this and is easy to use. It automatically adds all exact-match keywords as a negative keyword in your DSA campaign(s).

    Note: if you interrupt a ‘regular’ campaign, the keywords from this campaign will still be excluded in your DSA campaign. If you still want to be found on these keywords, you have to remove the negative keywords manually.

    Source & code link: here

    For those who use DSA ad groups within their campaigns? check this script.

    #3 Duplicate Query Checker Across Accounts

    Stay in control of your Google Ads queries.

    Multiple keywords can be eligible for the same user query. To prevent your data from being scattered all over the place, Brainlabs wrote a great script to find identical query’s in different ad groups. We’ve adjusted the script to look over account borders so you can check for duplicate queries across accounts. And we took the liberty to further enhance the script.

    The scripts check if a user query is matched to multiple keywords. This could be in the same ad group, across ad groups, and across accounts. If it finds a duplicate, the script then writes the results to a Google Sheet. This way you can easily spot duplicates and create negative keywords to prevent them. The script is tested in MCC’s with up to 9 accounts.

    Source & code link: here

    #4 Redirect Ad Updater

    Save time by automatically updating your ads’ final URL redirects.

    Website change, landing pages change, and URLs change. Several scripts are available to check for invalid links and 404 pages, but what about redirects?

    This script utilizes Google Apps Script’s UrlFetchApp to check if an ad has a redirect response code (3xx). If so, the script will fetch the new URL. Since Google Ads Scripts cannot edit existing ads, the ad with the old URL will be paused and its content will be placed into a new ad within the same ad group. This will be done for ETAs and RSAs.

    Source & code link: here

    #5 Quality Score Tracker

    Use this script to monitor the development of the Quality Score in your account.

    When you want to keep an eye on the quality of your Google Ads account, you can look at the quality score of your keywords. But realize that this is a snapshot. Unfortunately, there is no graph available in Google Ads with the historical values ​​of the Quality Score (QS).

    PPC Epiphany has built a solution for this. With this script, the quality score is retrieved from your account every day and saved. As a result, you will eventually see a graph showing the development of the quality score of your account. An indispensable script if you want to rate your account and see where you can improve.

    Source & code link: here

    #6 Keyword Quality Report

    Identify the keywords in your account where the quality of the ad or landing page needs to be improved.

    As part of the Quality Score assigned to each keyword in your account, a number of statistics are used that you can find in your account. It concerns the following metrics:

    • Ad relevance
    • Quality of the landing page
    • Expected CTR
    • Bounce rate
    • Time on Site (TOS)

    Source & code link: here

    #6 Link Checker Report

    Receive a notification when a landing page of your ads or ad extensions is no longer working. This prevents unnecessary costs of clicks that do not arrive on your website.

    Of course, a page may be (temporarily) unreachable on your website, with all the consequences for the Google Ads campaigns. There Google has made a nice script for it. The Link Checker automatically checks whether the URLs you use in ads or extensions are still easily accessible. If the page is temporarily unavailable or the script encounters a 404 error, this is placed in an overview and you can receive an e-mail.

    This script is a must-have for every account! Read through the script’s configuration, because you have to make a copy of a Google Spreadsheet.
    There is also a script available for your MCC, so you can check all accounts at once.

    Scheduling: Whatever the interval of control, make sure that the script runs every hour.

    Source & code link: here

    #7 Negative Keyword Conflicts

    Prevent your keywords from being blocked by exclusion words. This script goes through your account and reports all conflicts.

    Adding negative keywords while optimizing your campaigns is of course the most normal thing in the world. But it can sometimes happen that you have been too enthusiastic and that exclusion words have ended up in a list that will block keywords in other campaigns. Sin of course, because now there is no traffic on these keywords anymore. That’s why Google has created a nice script that checks all keywords and exclusion words/lists to make sure that no keywords are blocked. Because blocked keywords also do not provide Google with money.

    Source & code link: here

    #8 Performance Max Non-Converting Search Term Alerts

    Want to know where PMax campaigns are wasting your budget?

    Imagine having a Google Ads Script that alerts you every week on search terms that have had a significant amount of clicks, but ZERO conversions.

    Every week you’ll receive an email with a link to a Google Sheet that lists all these non-converting search terms. Ready for you to exclude them in your campaigns?

    Source & code link: here

    #9 Automatic Search Terms Excluder for Shopping

    The script automatically excludes search terms in shopping campaigns that don’t contain selected keywords.

    Suppose we are selling remote controls for televisions. It’s obvious that we want the search terms to include the word “remote”. Without it, users might just be looking to buy a TV (not a remote). Especially if the search term report indicates many phrases containing only TV models.

    This is exactly the situation where the following Google Ads script can help.

    Our tasks as PPC managers are:

    1. Verify shopping campaigns. We look for situations where the absence of a certain keyword means that the search terms lose value for us and don’t generate conversions.
    2. Choose this word and insert it into the script configuration. In the above example, it would be the word: “remote”. All search terms that don’t contain this phrase will be automatically added as exclusions in exact match.

    Source & code link: here

    #10 Performance Max Search Terms

    Export Search Terms from your PMax campaigns to Google Spreadsheets.

    Finally, it is now possible to export search term data from your PMax campaigns. This allows you to quickly see which search terms your campaign is showing on. Unfortunately no cost data (yet), but it does let you know if you are bringing in relevant impressions or not.

    Source & code link: here

    That’s all folks!

    These are the scripts (not all of them, but the most important ones) that I use to utilize in my campaigns. Some of them are more complex but others are a piece of cake.

    If you are an experienced performance marketing or martech guy, feel free to play with customizations to extract even more data and insights from these scripts.

    Hoped you like it!

    Let's Connect!

    I am eager to expand my professional network and connect with individuals from all career stages and backgrounds. Please feel free to reach out to discuss shared interests and perspectives.

    Related articles:

    How to scrape E-commerce Prices with Screaming Frog and XPATH

    For any digital marketer or e-commerce specialist, having up-to-date...

    LLM Comparison Case Study: Finding Basketball Stores in Greece – A Deep Dive into AI Response Quality

    Discover how different AI models approach the same query...

    Unlocking Hidden Potential: Mastering “Related Searches” and “People Also Ask” for Digital Acquisition

    In the ever-evolving landscape of digital acquisition, staying ahead...

    Overcoming the Synchronization Challenge: A Guide for Performance Marketers

    In today's fast-paced digital landscape, where consumer expectations are...

    The Moment We Built an AI Pioneer (With No AI Experience)

    Ah, the good ol' days of 2020-2021. Back when...