MCC Ad. Words Scripts Anomaly Detector Dashboard. If you’re anything like me, one of your least favorite parts of working on Ad. Words is taking care of all the tedious and repetitive tasks that are part of good account management. While necessary for great results, they’re also are boring tasks we often wish we could hand off to someone else, maybe even leave it for the computer to handle. That’s where Ad. Words automations come in handy.
There are automated rules and the more advanced Ad. Words Scripts that can help offload repetitive tasks in Ad.
Words. Automated Rules – Simple Daily Automations. Automated rules let you set simple daily automations, using a rule based system. You tell Ad. Words, “If this happens, then do that.”Here are a few examples of what Automated Rules can do: If the quality score of a keyword is lower than 3, pause it.
If the average position of a keyword yesterday was less than 2. If today is Saturday, enable my ads with the label ‘weekend ads’. While these automations are very useful, they are limited to the rules Ad. Words provides and they can only be run up to once per day.
So if you want to check that an account’s performance is not deviating from expectations, you may need something more powerful that can check stats several times per day. This is where Scripts excel…Ad. Words Scripts – Fully Customized Hourly Automations. Ad. Words Scripts are built on the same technology as Automated Rules, but they let you write the Java. Script code yourself.
These scripts can then be run automatically as often as once per hour and can automate things like custom reporting, adding keywords, pausing ads, setting campaign budgets, and creating ad groups from a datafeed. I have been writing scripts since they were introduced in 2. Ad. Words accounts. Ad. Words Script code. Screenshot taken July 2.
Ad. Words Scripts in MCC Accounts. Recently, Google made Ad. Words Scripts available for use in MCC accounts. So now if you manage a lot of accounts, you no longer need to add the script to each one but rather you add it to the MCC account where it can operate on all linked accounts. This is a big improvement from when scripts only worked in non- MCC accounts as it’s no longer necessary to copy- and- paste the same code into multiple accounts and keep track of which accounts you’ve already added the script to. MCC Ad. Words Script: Anomaly Detection. One limitation that still exists, however, is that it’s hard to make the script do slightly different things for each account you’re managing.
For example, say you want to use Google’s own Anomaly Detection script. This script sends an email if the clicks, impression or cost at any point during the day deviates from the expected level, based on a running average of several weeks of data. You may want to trigger an alert for one account if there’s a 2. You may also want to notify different people via email for each account.
You can retrieve all accounts (except for AdWords Express accounts) under an MCC using the accounts method, e.g. // Keep track of the MCC account for future reference. var mccAccount = AdWordsApp.currentAccount.
With scripts the way they are today, that means maintaining the settings inside the code (which makes version management a nightmare). For the Anomaly script, Google did a smart thing and put the settings for each account in a Google Sheet so that it’s easier to make changes, but you have to access several sheets to see how things are going, and that still takes too much time. Screenshot of Google Sheet showing Ad.
- Discover how Google AdWords Manager Accounts (formerly My Client Center or MCC) can simplify your campaigns with comprehensive PPC project management tools.
- AdWords scripts let you make automated changes in your AdWords account. Using JavaScript code, you can change bids, pause ad groups, and add keywords with written scripts directly instead of manua.
- Example AdWords Scripts to detect anomalies in the performance of accounts. Script results for all AdWords accounts are aggregated in a dashboard.
AdWords Scripts Forum Welcome to the AdWords Scripts forum, a place to give feedback, ask questions, report bugs, and discuss best practices. This forum is moderated by Googlers and your feedback is highly appreciated. Showing.
Words accounts that are performing better or worse than expected based on historical averages. Screenshot taken July 2.
I was struggling with version management and spreadsheet overload, so I decided to improve the Anomaly Detection script by moving the code out of the script I copy into each account and keeping the settings for all accounts in one place. Then I also added color coded warnings in a Google Sheet so that I can see all my accounts in a dashboard rather than having to watch my email to get alerts. I’ll walk you through how I did this so you can use the same techniques for your own Ad. Words Scripts. Keep All Script Settings in One Google Sheet. Google was smart to write the script in a way where the settings are kept in a spreadsheet. Many marketers are simply not comfortable tweaking settings inside the code and by using a Google Sheet for the settings, they removed a big barrier to adoption. What I don’t like is that each account gets its own sheet so I changed the script to pull settings for all accounts from a single Sheet.
Now when I want to run the script in a new account just added to MCC, I simply add a new line to my existing Sheet. The following code reads the header of the Sheet and assigns the settings to a variable that the script uses: // SETTINGS. Sheet needs to open the Google Sheet first. SETTINGS. task. Sheet. Data. Range(). var num. Rows = rows. get. Num. Rows(). var num.
Cols = rows. get. Num. Columns(). var values = rows. Values(). // Read Header Rows.
Names = new Array(). Cols; i++) {. var value = "" + row[i]. Names[i] = value. Read Data Rows With Settings. Names. length; j++) {. Name = header. Names[j].
SETTINGS[header. Name] = value. Store The Ad. Words Script Code Remotely. Even now that we can add scripts in MCC accounts, I still find myself having to copy the same script into multiple accounts, because we have a few different MCCs and sometimes I do account audits where the customer prefers not to link with Sales. X’s MCC. Because I don’t want to manually update the code in several accounts whenever I make a script enhancement, I use the following code that fetches the code from my own server (I learned how to do this from Free. Ad. Words. Scripts. To. Fetch = “URL TO WHERE SCRIPT JS FILE IS LOCATED. File = Url. Fetch.
App. fetch(file. To. Fetch). var script.
Text = script. File. Content. Text(). SETTINGS. Name = "remote. Script".
Text). var script = eval('new '+SETTINGS. Name+'(); '). var done = script. The remotely hosted Ad.
Words script looks like this: function remote. Script() {. this.
The code that does all the work goes here. Finally I made some other tweaks to the script from Google. Rather than making email the main way to find out about anomalies, I use green and red cells in the sheet to highlight which accounts are delivering more or less than expected.
I also added the ability to trigger an alert using conversion data, but I’ve found that’s not all that useful since conversion data for many accounts comes from Google Analytics and with the two- day reporting delay it triggers too many alerts. If you want the full script code for the MCC level Anomaly Detector, you can download it from our Ad. Words Script Library at Optmyzr. Ad. Words Scripts easier to use for everyone. We’ll make an official announcement about that before the end of this month. I hope these tips on how to run Ad.
Words Scripts in MCC accounts are useful and if nothing else, that you enjoy the Anomaly Detector script I’ve tweaked to make it more useful in my eyes. Featured image made by author.