Anomaly Detector Script - User Guide

What does the Anomaly Detector Enhanced Script do?

The Anomaly Detector script lets you set an alert for scenarios when an account's key metrics deviate from expected performance levels for the given day of the week and hour of the day. It lets you see the status of all your accounts in a single spreadsheet and serves as a mini dashboard. This enhanced script is an adaptation of Google's Anomaly Detection script and works at the MCC account level.The script aggregates all settings and outputs in a single Google Sheet and adds a color-coded dashboard to complement email notifications.


How to set it up?

Choose the account you want to run the script on and go to the All Enhanced Scripts page. On this page select the Anomaly Detector. You can either create a new setting 'Create new setting' or 'Copy setting from an existing account'. To create a new setting, follow the steps below:

Basic Settings

  1. Setting Name
    Enter the name you want to give the setting. The same script can have multiple settings for the same account. You can choose to pause and enable settings as you wish. 
  2. Google Spreadsheet Setting
    The URL of the Google Sheet where you want to track all anomaly alerts. You can use this to track alerts for multiple accounts in one place. If you want to create a new spreadsheet everytime the script runs, you can write NEW
  3. Sheet Setting
    The name of the Google spreadsheet where the script copies the results. If you want to copy the results in an existing spreadsheet, put in the address of the spreadsheet and make sure the sharing settings are set correctly otherwise the script will not be able to make changes to the spreadsheet. If you leave 'NEW' in the spreadsheet setting, the script will create a new spreadsheet in the Google Drive folder associated with your AdWords account email.
  4. Notification and Sharing
    Email Addresses To Notify:
    The script can send an automatic email after it finishes running. If you would like to send the notification email to multiple people, you can enter their emails in the 'Email Addresses To Notify' setting and they will be notified.
    Share Results Spreadsheet With These Google Accounts:
    Enter additional email addresses you want to share the spreadsheet with. These will be the email address associated with the Google account of everyone who should have access to the spreadsheet generated by this script. Use a comma-separated list for multiple email addresses.
  5. Sensitivity of Alerts
    You can set the sensitivity of alerts for different metrics by defining a threshold for metrics like Impression, Clicks, Cost, and Conversions. Threshold means the percentage by which today's values may differ from the expected averages before triggering an anomaly alert. For example, 0.20 means an anomaly is triggered if there is more than a 20 percent difference, either higher or lower. Select 0 if you do not want to be alerted about this metric.


Advanced Settings

The Advanced Settings section of this script gives you the option to include additional settings in the script like checking for specific text on the page or sharing the results spreadsheet with multiple email addresses. In this section you can:

  1. How to Calculate the Baseline of What is Expected
    The number of weeks used to calculate the average expected performance.
  2. When to Get Alerts
    The hours when you want to be alerted of anomalies. Add each hour separately and use the 24-hour notation, e.g. enter 15 for 3 pm. This is useful when you don't want to be alerted of anomalies very early in the day when the numbers may be too small to be meaningful. To check during all hours you can leave this blank. To check during the first hour of the day, use 0 instead of 24. 
  3. How to handle Google Reporting Delays
    Google reports are not real-time. So, the data from the last three hours may not be included in the reports we use to check for anomalies. Use this setting to specify how many hours we should delay checking. For example, if you choose 3 here then at 10am we will check stats through 7am. 
  4. Log Settings
    Show Debug Data In Logs: Select this option to get a complete list of logs which can be useful when reporting a problem to Optmyzr. This option can decrease the performance of scripts so it is recommended to be turned off if not necessarily needed.
    Show Verbose Output In Logs: Select this option to see how the script operates. This option helps to understand how the script works. But it may slow down the performance so it is recommended to be used only for the first time you want to check if all the settings are in place.


How to install and run the enhanced script?

After entering the details for the setting, click on 'Save settings'. This will give you an option to 'Download' the script which can then be installed in the AdWords account. For detailed steps on how to install a script in AdWords read this article. This script can also be run at the MCC level. This article explains how to install and run enhanced scripts at the MCC level. 




Can’t find what you’re looking for?

Our award-winning customer care team is here for you.