Advanced AdWords Scripts – Harder, Better, Faster, Stronger: SMX Advanced

June 4, 2015 | 3 min read
By Scott Garrett

What are AdWords scripts?

You have probably heard of them and may know that they can be used to:

  • Manage keywords, ads, ad groups and campaigns
  • Create and automate delivery of custom reports
  • Perform many other tasks

However, my guess is that you are not using them – why is that? Maybe most people do not know how to approach utilizing scripts and do not fully understand the potential benefits of them. Well, one person certainly understands them and has been using them for years. His name is Russell Savage, a systems architect for Elastic.co and creator of http://www.freeadwordsscripts.com/ . His session at SMX Advanced focused on not why we should use scripts, but how to improve their use, or, as he said, “making them ‘Harder, Better, Faster, Stronger.'” Unfortunately, he did not have Daft Punk swag to give out.

FullSizeRender11

Below are some highlights from his session with the main points divided out by Daft Punk’s song title – not in the correct order, but in the order he presented in – and I will warn you ahead of time that his session was heavy in code, so this post has some code as well.

  • Faster
    • Find slow code and speed it up!
      • Follow best practices on the Google Developers page (actually read them!)
      • Pay close attention to the use of IDs for filtering
      • Use a profiler to find slow code chunks
        • Run a javascript function to get speed results from your code to ensure your code does not timeout and the script does not fire

Slow Code Profiled

  • Better
    • Make your code easier to use and maintain
      • Pick JavaScript coding style and stick with it – keep your style consistent to help in identify bugs in the future
      • Use functions and class to make your code a lot cleaner
        • Avoids writing the same code twice
        • Helps in documentation

Documenting Complicated Code

  • Stronger
    • Make sure your code is robust and can deal with outside externalities (APIs and maybe co-workers?)
    • Fortify your code against API errors and changes
      • When your API code does fail, do a retry
      • Always sleep between retires – to avoid overloading the API and crashing it
    • Be notified when your script fails
      • AdWords scripts are not good at alerting you, so setting up a built-in code alters will allow you to stay on top of errors
      • Watch out for altered code, checksums allow you be notified when changes are made to your code, so you can ensure co-workers or outside partners are not crashing your script code
  • Harder
    • Generate tasks from scripts
      • You can run scripts to remind you to run reports, change bids, etc. if you do not want the script to do those thing for you
    • Send Data to mySQL database
      • Pull in the data your SQL database to allow you and your team to internally write code against it
    • Machine learning with predictive APIs
      • This is probably the coolest one of them all – It’s the ability to create scripts to call on Google’s API to not only for example increase bids for your umbrella keywords when it is forecasted to rain, but also allow Google to decide how much to increase the bids based on its own learnings. It’s like the friendly version of Skynet that wants to make sure people have umbrellas for when it rains, not plotting humanity’s downfall.

Russell really hopes that marketers will begin to adopt AdWords scripts at a higher rate, as their usability becomes better and features/potential are more well known. Ideally, he sees scripts becoming a true, viable alternative to the AdWords API.

What is your experience with AdWords scripts? Comment below and follow me @ScottGarrett89.


Everything About APIs You're Afraid to Ask - SMX Advanced
Facebook Targeting Made Simple: How to Effectively Target Groups in Facebook Ads
Subscribe to the Digital Marketing Tip!
Get the latest insights and time-tested wisdom from veterans of the digital marketing industry.

Advanced AdWords Scripts – Harder, Better, Faster, Stronger: SMX Advanced

June 4, 2015 | 3 min read
By Scott Garrett

What are AdWords scripts?

You have probably heard of them and may know that they can be used to:

  • Manage keywords, ads, ad groups and campaigns
  • Create and automate delivery of custom reports
  • Perform many other tasks

However, my guess is that you are not using them – why is that? Maybe most people do not know how to approach utilizing scripts and do not fully understand the potential benefits of them. Well, one person certainly understands them and has been using them for years. His name is Russell Savage, a systems architect for Elastic.co and creator of http://www.freeadwordsscripts.com/ . His session at SMX Advanced focused on not why we should use scripts, but how to improve their use, or, as he said, “making them ‘Harder, Better, Faster, Stronger.'” Unfortunately, he did not have Daft Punk swag to give out.

FullSizeRender11

Below are some highlights from his session with the main points divided out by Daft Punk’s song title – not in the correct order, but in the order he presented in – and I will warn you ahead of time that his session was heavy in code, so this post has some code as well.

  • Faster
    • Find slow code and speed it up!
      • Follow best practices on the Google Developers page (actually read them!)
      • Pay close attention to the use of IDs for filtering
      • Use a profiler to find slow code chunks
        • Run a javascript function to get speed results from your code to ensure your code does not timeout and the script does not fire

Slow Code Profiled

  • Better
    • Make your code easier to use and maintain
      • Pick JavaScript coding style and stick with it – keep your style consistent to help in identify bugs in the future
      • Use functions and class to make your code a lot cleaner
        • Avoids writing the same code twice
        • Helps in documentation

Documenting Complicated Code

  • Stronger
    • Make sure your code is robust and can deal with outside externalities (APIs and maybe co-workers?)
    • Fortify your code against API errors and changes
      • When your API code does fail, do a retry
      • Always sleep between retires – to avoid overloading the API and crashing it
    • Be notified when your script fails
      • AdWords scripts are not good at alerting you, so setting up a built-in code alters will allow you to stay on top of errors
      • Watch out for altered code, checksums allow you be notified when changes are made to your code, so you can ensure co-workers or outside partners are not crashing your script code
  • Harder
    • Generate tasks from scripts
      • You can run scripts to remind you to run reports, change bids, etc. if you do not want the script to do those thing for you
    • Send Data to mySQL database
      • Pull in the data your SQL database to allow you and your team to internally write code against it
    • Machine learning with predictive APIs
      • This is probably the coolest one of them all – It’s the ability to create scripts to call on Google’s API to not only for example increase bids for your umbrella keywords when it is forecasted to rain, but also allow Google to decide how much to increase the bids based on its own learnings. It’s like the friendly version of Skynet that wants to make sure people have umbrellas for when it rains, not plotting humanity’s downfall.

Russell really hopes that marketers will begin to adopt AdWords scripts at a higher rate, as their usability becomes better and features/potential are more well known. Ideally, he sees scripts becoming a true, viable alternative to the AdWords API.

What is your experience with AdWords scripts? Comment below and follow me @ScottGarrett89.

Share This Post
PREVIOUS POST

Everything About APIs You're Afraid to Ask - SMX Advanced
NEXT POST

Facebook Targeting Made Simple: How to Effectively Target Groups in Facebook Ads
Subscribe to the Digital Marketing Tip!
Get the latest insights and time-tested wisdom from veterans of the digital marketing industry.