Google Ads Script: Expensive CPC Detector

Warns of extremely high click costs and/or when expensive clicks cause high costs in total. The search queries, keywords, products, placements, landing pages, campaigns and ad groups found are reported by email. High CPCs are also found in Performance Max campaigns. However, Google has restricted the options for PMax campaigns.

Alert Monitoring Read-only
Sends an e-mail when something should be checked
The script monitors the Google Ads account (hourly or daily execution).
No changes are made in Google Ads, the Merchant Center or Google Analytics.

 One script for various CPC warnings

See also the configuration example below.

 A script for agencies and non-technicians

Simple configuration

Wenn man das Skript zum ersten Mal startet, wird automatisch ein Config Sheet (Google Spreadsheet) erstellt, in dem für jeden Google Ads Account eine Zeile angelegt wird. So kann man für jeden Account im MCC unterschiedliche CPCs definieren, ab wann man gewarnt werden möchte.
Es kann jedoch sinnvoll sein das Skript mehrfach mit unterschiedlichen Parametern ausführen zu lassen.

Easy to use

If you do not define any parameters, but only set “#execute” to TRUE in the sheet, the 50 most expensive clicks of the last 10 days are searched for. The search queries, keywords, products, placements, landing pages, campaigns and ad groups found with the respective CPC are sent as a table by email.

 Warning in case of extremely high CPCs

In the first email you get a good overview of how often expensive clicks occur and whether there are CPC outliers with extremely high click costs. If you want to receive a warning email in the future when CPCs exceed a certain amount, you only need to enter this amount in the “alertCPCgreaterThan” column. That's it!

 Warning of high costs due to high CPCs

If you are less interested in individual clicks with extremely high CPCs, but want to be warned when expensive clicks in the last 10 days exceed a certain amount in total, this can also be configured very easily. Simply define in “alertCPCgreaterThan” the amount from which the CPCs are expensive for you and run the script. In the email below the table, you can see how expensive these clicks were in total. Now simply add to the “minCosts” column the point at which warning emails should be sent. This way, you will only receive a warning via email if the total cost of expensive clicks exceeds your pain threshold.

 Example e-mail

Google Ads Script Expensive CPC Detector Alarm Email

 Configuration parameters

ParameterBeschreibung
alertCPCgreaterThanOnly CPCs higher than the amount defined here are reported.
minClicksThe default setting is 1 in order to also find extreme outliers in the click costs. If you define a higher number here, the average CPC is considered and extreme outliers are no longer as significant.
minCostsAvoid emails that are not relevant because individual clicks with high CPCs are not significant by defining an amount here as described above, how expensive the clicks with high CPCs of the last 10 days must be in total.
minIssuesThis parameter is also used to avoid unimportant email notifications. If you notice that you often receive emails with e.g. three high CPCs, but three warnings are irrelevant for you, define minIssues=10 and in future you will only receive emails if at least 10 high CPCs are found.
Each email also contains links to the parameters in the sheet. This means that clicking on such a link will take you to the right place in the sheet and you only have to enter the value!
maxIssuesToReportLimits the number of search queries, keywords, products, placements, landing pages, campaigns and ad groups listed in the email.
numberOfDaysNormally, nothing is entered here and the script automatically uses the value 1 or 10.
If numberOfDays>1, different periods of the last numberOfDays days are examined to find the highest click costs.
If only the standard parameters are used, the system searches for expensive clicks within the last 10 days. If you only specify the parameter "alertCPCgreaterThan", the system will only search for clicks with high CPCs on the previous day. However, if minClicks, minCosts, minIssues are used, a period of 10 days is considered again, unless “numberOfDays” has been explicitly defined.
checkDefault value: standard
Possible values are 'standard' and 'all':
  • standard=["searchterms","keywords","products","placements"]
  • all=["campaigns","adgroups","searchterms","keywords","products","placements","landingpages"]

Parameters that apply to all scripts

Configuration example

Suppose you see in the first email with the most expensive clicks of the last 10 days that almost all CPCs are below 1.5 euros. The sum of the costs of the CPCs over 2 euros is 100 euros, which is still not critical for you. 3 outliers with costs over 10 euros immediately catch your eye. You also notice a search query with 20 clicks where the average CPC is still over 4 euros. In order to only receive a warning email in future when things become critical for you, you could make the following settings.

#multiSettingsNamealertCPCgreaterThanminCostsminIssuesminClicks
unacceptable CPCs20.00
Extremely expensive CPCs10.0010
Expensive CPCs with many clicks4.00520
High costs due to expensive CPCs2.00300.00

With this configuration, you will only receive a CPC warning email if one of these conditions is met:

  • Yesterday, at least one average CPC for clicks on a specific search query, keyword, product or placement was found that was more expensive than 20 euros.
  • In the last 10 days, at least 10 average CPCs were found for clicks on specific search queries, keywords, products or placements that were more expensive than 10 euros.
  • In the last 10 days, at least 5 average CPCs were found for clicks on certain search queries, keywords, products or placements that were more expensive than 4 euros and the CPC was calculated from at least 20 clicks in each case.
  • In the last 10 days, any number of CPCs were found for clicks on certain search queries, keywords, products or placements that were more expensive than 2 euros and cost at least 300 euros in total.

 Download Google Ads script Expensive CPC Detector

Please log in or register in the Ads Scripts Store first to download the script (why is this necessary?).

E-mail address
Password:

Do you have any questions?

I will gladly answer your questions
Google Ads Experte Holger Schulz
Holger Schulz

✉ holger.schulz@ads-scripts.com

linkedin.com/showcase/ads-scripts-store/