Tuesday, June 14, 2016

Here’s a script to track your AdWords spend every hour of the day

timer-stopwatch-ss-1920

I’ve shared some scripts about checking for AdWords basic mistakes and empty ad groups, but there are still many mistakes that can slip through the net. And even if your account is perfect, the world of search is often unpredictable and perilous.

There is one answer: constant vigilance!

Well, two answers: constant vigilance and automation.

We can’t replace human scrutiny with scripts (yet), but we can help out by making sure the needed data is always available. So at Brainlabs (my employer), we have a script that emails you every hour with the current cost of your account (See below).

Now, if there’s a sudden surge in spend or slump in searches, you’ll know about it and be able to act in time. It can also give impressions and clicks, and (if you don’t have any lags for them) conversion data.

To set up the script, go to your AdWords account, then choose Bulk Operations and go into Scripts. Then, click the red “+ SCRIPT” button and paste in the code below.

There are a couple of settings for you to change (unless you want your emails to go to aa@example.com):

  • If you don’t want to look at metrics from all campaigns (Say you’re not concerned about Display campaigns), you can list phrases contained in campaign names which you would like to exclude in campaignNameDoesNotContain. For example, [“Display”] or [“Display”, “Shopping”]. Or you can enter phrases contained in campaign names which you would like to include in campaignNameContains. Leave these both as [] to look at your whole account.
  • The important one is email: Change this to your email address or a list of email addresses.
    • AdWords Scripts will send emails even when you’re just doing a Preview run. So you might want to just use your email address here when you first set up the Script, and then add in other people once you’re sure it’s working.
  • metricsToReport says which metrics you want to, uh, report. If you’d like to keep track of clicks and impressions, as well as cost, then put this down as [“Cost”, “Clicks”, “Impressions”]. If you only care about cost, then it’s just [“Cost”].
    • Your options for this are “Impressions,” “Clicks,” “Cost,” “ConvertedClicks,” “Conversions” and “ConversionValue.”
    • Note that there may be a delay for conversion data (even longer than for AdWords data in general). If you get conversions from Analytics, you could be waiting an entire day. So be careful if you are reporting these.
  • currencySymbol will be stuck in front of any currency values (i.e., costs and conversion values) in the email.
  • thousandsSeparator and decimalMark are used to format numbers; so if thousandsSeparator is “,” and decimalMark is “.” then numbers will appear like “1,234.56.” If thousandsSeparator is “.” and decimalMark is “,” then numbers will appear like “1.234,56.”

Authorize and Preview the script to make sure there are no errors.

You should get an email that looks something like this:

 

AdWords Script

When it’s all working, set up an hourly schedule.

A few notes:

  • Any emails the script sends will appear to be from you.
  • What counts as “today” depends on the time zone of your AdWords account. The time reported in the email is also based on the account’s time zone.
  • There’s a lag of about 20 minutes before AdWords gets data. For example, if the script runs at 10:20, it will probably only have the full data for the day up to 10:00.
  • The report includes paused and removed campaigns, as well as enabled ones — after all, the money doesn’t get unspent just because you’ve deleted something.

The post Here’s a script to track your AdWords spend every hour of the day appeared first on Search Engine Land.

No comments:

Post a Comment