AdWords
4.3K members online now
4.3K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Adwords Script Starter

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

I have been using AdWords for almost 2 years, and now finally explore the AdWord's script. 

 

So initially I wanted to create an automation rule to check some keywords budget spend, for example, if keyword (or ads, similar concept) "car" spends $100 and don't generate any leads / conversations, I need AdWord to pause the keyword but enable it at 11:59 PM on same day. Therefore it requires AdWords to check the keyword cost from time to time. 

 

Unfortunately I can't achieve it through Automation Rules. I know a little bit programming, but haven't touched JavaScript yet.

 

Question

 

1. Are there any easy ways to accomplish this?

2. What do I need to get this script start? 

1 Expert replyverified_user

Re: Adwords Script Starter

Top Contributor
# 2
Top Contributor

Hi @Joe R there's no easy way to teach you AdWords Scripts on this board, but luckily Google has lots of resources that should help.  You could start here:

 

https://developers.google.com/adwords/scripts/docs/examples/keywords

 

which has some samples for working with Keywords, and should have enough details in those examples for you to get what you need.  Here's a couple of extra pointers though.  AdWords Scripts always need a main() function, but it's a good idea not to use that function for anything other than to call other functions that you write.  This allows you to build a easy to follow structure and also to have "useful" functions you can copy and paste and use in other scripts, rather than those bits being lost in a single large piece of code.  For example, if you wanted to run the getKeywordStats() function shown in the link above, I'd write it in a script as follows:

function main() {
  getKeywordStats();
}

function getKeywordStats() {
  //rest of code goes in here
}

The other trick is about timing.  The most frequent way to run Scripts is hourly, so you're effectively limited to running any script 24 times in a day.  However, the time that the script runs within that hour is the time at which that script is saved.  For example, right now it's 10:38BST, and if I were to save a script now and schedule it to run hourly, it'd run at 38 minutes past the hour each hour.  Knowing this means, with a bit of careful clicking, that you can get a script to run almost on the hour, or at 59 minutes, etc.

 

Hope this helps,

 

Jon

 

 

 

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits
Highlighted

Adwords Script Starter

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hello John

How can I retrieve one specific keyword (like 'car parts') current spend/cost from specific ad group and campaign?