Advanced Google Ads script removes locations from keywords
This script automates the removal of individual locations from keywords at-scale within Google Sheets.
One of the most tedious tasks when working with location-based keywords is removing the individual locations from the keywords at-scale. These are the location-based keyword terms such as “car dealership London.”
Like with any tedious, repetitive task the developers at my agency created a Google Ads script to automate removing the locations from keywords within Google Sheets.
How the script works
The script pulls all of the keywords within your account and then searches each one against our database of all UK locations.
You can also configure it to only pull keywords from certain campaigns in the settings which I will explain in the setup section below.
It then pulls the location from the keywords and creates an output as below. The keyword is in the first column and then the location that is contained within it is in the second column.
How to set up the script
Before you can run the script there are a few variables that you need to configure.
- On line 18. You will need to create a new Google Sheet which will be used to output the report showing the keywords and the locations within them. You will then need to specify the URL of the sheet that you want the report to be outputted to on line 18 of the script.
- On line 21. You can change which campaigns you want to include. To include all of the campaigns that contain the term “brand” for example, you would enter the word “brand” here. if you want to include all of the campaigns, then just leave this field blank.
- On line 22. On the other hand, if you want to exclude all of the campaigns that contain the term “generics” for example, you would enter the word “generics” here. if you want to include all of the campaigns, then just leave this field blank.
Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.