Google Ads anomaly monitoring with automatic alerts to Slack channel

Human error and going over credit limit are just too common reasons for misbehaving Google Ads campaigns.

Using automation and Slack for alerts is an easy way to detect these situations.

Everyone has experienced these or similar situations:

When (not if!) this happens, it is critical to note the anomalies as soon as possible.

We have solved this by

In this way, everyone in the Google Ads team will see the alerts and they don’t fill your mailbox.

Install the account anomaly detector by Google

First, you need to install Google’s anomaly detector to your MCC Scripts.

Instructions can be found here. I would highly recommend adding the filter on row 49  to exclude accounts using a filter such as ACCOUNT_LABEL: ‘no_mcc_alerts’.

[sourcecode language=”javascript”]
var CONFIG = {
// Uncomment below to include an account label filter
ACCOUNT_LABEL: ‘no_mcc_alerts’
};
[/sourcecode]

This allows you to tag labels with “no_mcc_alerts” to remove them from monitoring.

Furthermore,  the script can be a bit trigger happy so I would recommend setting Impression and Click limits to 5%. I tend to not use conversion alerts as I monitor hundreds of accounts and alerting for conversions tends to create too many false positives. Spend I have at a 1000 %.

These limits might seem high but a script like this is really only intended to ensure nothing goes horribly wrong with your Google Ads accounts. A 1000% alert on spend will give you a heads up in case of a fat finger mistake when changing the budget. The 5% threshold on clicks and impressions will alert you if your payment method fails. However, especially when using this in an agency, creating as few false positives as possible is crucial as people do have a tendency to ignore alert spam on Slack or otherwise.

It is also worth removing a few lines from the MailApp.sendEmail() around row 318. It creates unnecessary links to your Slack and you probably don’t need a daily reminder of how to access Google Ads MCC. You can replace the MailApp.sendEmail() in the original script with the following:

[sourcecode language=”javascript”]
MailApp.sendEmail(email,
‘Google Ads Account ‘ + account.getCustomerId() + ‘ misbehaved.’,
‘Your account ‘ + account.getCustomerId() +
‘ is not performing as expected today: nn’ +
bodyText + ‘nn’);
[/sourcecode]

Once you have installed the script and are happy with your thresholds, create an email account for the purpose and send your alerts to the new inbox.

The default subject is “Google Ads Account 12345 misbehaved” so you can use this string to identify which emails to capture with Zapier. Alternatively you can change the subject & message around line 317 to identify emails.

Schedule your script to run daily or hourly, depending on what frequency you think these alerts are useful. Keep in mind that the script compares Mondays to Mondays, Thursdays to Thursdays as well as comparable time-periods. This means that if the script runs on Monday at 08:00 it will compare Monday 00:00-08:00 to previous 4, 8, 12 (depending on your settings) Mondays 00:00-08:00. Thus – in theory – you can run the script hourly. However, I have noticed we get a lot fewer false positives when we run the script once in the evening. As this script exists to assist humans, its very important not to annoy them with false positives!

Once you have made a few test runs, are happy with your thresholds and have a few “Google Ads Account 12345 misbehaved” in your email, you can start sending alerts to Slack via Zapier.

Start sending to Gmail and create a filter to label all messages containing ‘misbehaved’ from your MCC email with ‘adwords_misbehaved’.

Send data from Gmail to Zapier

Select Gmail + Slack.

  1. Create new Zap, select Gmail as your first App.
  2. Select “New Email” as trigger.
  3. Connect your account
  4. On setup options – Label/Mailbox select your label, in this example “adwords_misbehaved”

Save + continue and select your second app, Slack.

  1. Select Send Channel Message
  2. Select the Channel you want to post in, select send as bot
  3. For “Message Text” select email body.

Thats it! You should now get neat alerts to Slack if any of your accounts misbehave.

Interested in this topic?

Call us 020 788 8120 or fill out the form below and let's continue the conversation!