Google Ads Skript:
Campaign metrics out of limits alerts
The ultimate script to monitor key figures such as conversions, costs, impressions etc. of Google Ads campaigns. You can check absolute values for configurable time periods
| Alert | Monitoring | Save costs | Read-only |
Examples of checks
Different checks can be carried out for different key figures for each campaign. For example:
- Number of conversions yesterday must be greater than 2000.
- Costs of the last 7 days must be between €200,000 and €300,000.
- Deviation of the number of conversions in the last 7 days from the previous week must not exceed +/- 30%.
- Deviation of the number of conversions in the last 28 days from the previous period must not exceed +/- 15%.
If at least one test fails, you will receive an alarm e-mail listing all the problems found.
Example alarm e-mail
In this alert email, the problem was recognized that the costs of the campaign “Search Prio” of the last 2 days were more than 30% higher than in the comparison period (previous week). Diagrams with (configurable) key figures are always displayed under the detected problems.
Click on "alerteIncrease" to go directly to the "alerteIncrease" parameter in the Campaign metrics out of limits alerts script config sheet, so that you can immediately adjust the "30%" for alerteIncrease or other parameters. By clicking on "Google Ads Account" you are immediately in the Google Ads account of Demo AG. cost_micros is Google's metric name for the costs.
Configuration
It is advisable to monitor several key figures for each account and for each campaign. If several unauthorized deviations are detected, you will receive all of them together in one email.
Configuration parameters
| Parameter | Description |
|---|---|
| campaignName | The name of the campaign to be monitored. Tip: Create several lines for each campaign and configure different key figures (impressions, costs, |
| campaignNamesOrPattern | Replacement for campaignName. Allows multiple campaigns to be checked. Default value: [empty = all campaigns] Either one or more campaigns with full names in [] or a pattern can be specified. Examples: 3 campaigns: ["Brand Search","Shopping Prio","PMax"] All campaigns that contain "Brand": *Brand* All campaigns that do not contain "Brand": !*Brand* |
| campaignLabelNames | Alternatively, several campaigns can also be selected via labels. |
| eachCampaignIndividually | Default value: FALSE FALSE: If several campaigns have been selected, the aggregated data of these campaigns is checked. TRUE: Each campaign is checked against the specified test parameters. |
| metricName | If you click on the small arrow in the cell, you can select the most popular metrics (Costs, impressions, costs per conversion, average costs, clicks, conversions, conversions by time, conversion value by time) directly. But other metrics are also possible. |
| daysBackRecent | 1 = analyze the period from yesterday, 0 = from today |
| daysBackCompareTo | 7 = compare with the metrics of a week ago. |
| numberOfDays | 1 = only consider the metrics for one day. The value must be less than or equal to daysBackCompareTo. |
| alertLessThan | Absolute value. An alarm email is sent if the value falls below this value. |
| alertGreaterThan | the same for greater |
| alertDecrease | Compares the "recent" period with "compareTo" over the defined number of days. If "recent" deviates downwards by more than alertDecrease %, you will receive an alert email. |
| alertIncrease | the same for increase |
| #hours | Tip: If metrics are to be checked from yesterday, set #hours=5,6,7 so that the execution does not take place directly after midnight, when some metrics are not yet provided by Google. |
This script is free of charge. However, the red parameters are exclusive to users of the web application SEA Suite. Some advantages of
- Script results can be sent to
SEA Suite and/or by email. - Clear display and management of all script results and warnings for all accounts you manage.
- Also ideal for teams. Tasks can be marked as completed, for example.
- Extended functionality of some scripts exclusively for
SEA Suite users. - Additional scripts exclusively for
SEA Suite users.
Try SEA Suite free for one month!
Please log in so that you can view the non-public scripts and the extended functions available to you.Parameters that apply to all scripts
Note on the timeliness of metrics in Google Ads
The problem
Google sometimes provides metrics (especially conversions) step by step with a significant delay. This means that if you retrieve the metrics for a specific date every day, the metrics will gradually approach the actual value each day. The extent of this effect depends on the account and the metric. In our experience, if you retrieve yesterday's cost data at 5 a.m., you will receive a value that will not change significantly. If, on the other hand, you retrieve conversion data, you may see over 40% fewer conversions than actually occurred. It takes a few days to get reliable conversion data from Google.
According to Google, conversion data (including time-based data) can change significantly within 7 days, change slightly for up to 30 days, and should not change after 30 days.
The solutions
Do not retrieve yesterday's data before 5 a.m.
It makes sense to check a lot of data from yesterday so that you can react quickly to any problems. It is recommended to enter 5, 6, 7, and 8 in the #hours column so that data from the previous day is only read from 5 a.m. onwards. This gives Google at least a few hours to update data from the previous day. (The additional hours are just a precaution. If there are any problems with script execution, it will be tried again an hour later.)
Take incompleteness into account
When checking metrics for yesterday or the last few days, you must take into account that these may not yet be complete. When checking metrics for the last few days, you should therefore primarily check extreme values and, for example, take into account that only half of the conversions from the previous day may already be included in Google's data.
Multiple checks for the same metrics
It makes sense to check the previous day to see if conversions_by_conversion_date is greater than 0 (or a value 50% below the minimum) in order to receive an alert in case of tracking failures. For a further test, configure daysBackRecent=7 to check the metrics from a week ago to see if they are within the normal range. You can decide whether to check only a single day with a large tolerance or whether it is better to check a period of several days so that outliers on individual days do not lead to unnecessary alerts.
Download Google Ads script Campaign metrics out of limits alerts
Please log in or register in the Ads Scripts Store first to download the script (why is this necessary?).
