The Anomaly Detector script lets you set an alert for scenarios where an account's key metrics deviates from the expected performance levels, for a 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.

Basic Settings

Google Spreadsheet Settings

Spreadsheet URL: The script outputs the results onto a Google Spreadsheet. There are two options for this, you can:

  • Paste the results into an existing spreadsheet. For this, you'll need to detail the address of the spreadsheet. The sharing settings for the spreadsheet should be 'anyone with a link'.

Note: If the sharing settings are not correct, the script will not be able to write the URLs it checks, onto the spreadsheet.

  • Create a new spreadsheet each time the script runs. For this, simply leave "NEW", in the text field.

Name Of Target Sheet: This field determines the name of the new spreadsheet to be created, if "NEW" is selected. If you selected to paste the results onto an existing spreadsheet, and such spreadsheet is not located, this name will be used to create a new one with the results.

Notification and Sharing Settings 

  • Share Results Spreadsheet With These Google Accounts: Enter additional email addresses you want to share the spreadsheet with. Use a comma-separated list for multiple email addresses.
  • 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

  • How to Calculate the Baseline of What is Expected: The number of weeks used to calculate the average expected performance.
  • 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. To check during the first hour of the day, use 0 instead of 24.  If it is left blank, the script will run for every hour.
  • 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 10.00 am we will check stats through 7:00 am. 

Log Settings

  • Show Debug Data In Logs: Select this option to get a complete list of logs that 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 understand how the script works. It may, however, 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.
Did this answer your question?