Use Cases
    Capabilities
    Roles

Automate Google Ads with Scripts

Aug 5, 2020

Watch or Listen on:

Episode Description

Dive into the world of PPC automation through the lens of Google ad scripts. Even if you’re not a coder, you’ll learn how ad scripts can significantly enhance your PPC management efficiency. Experts share insights on the easiest ways to start using scripts, effective strategies for integrating them into your PPC campaigns, and highlight some of their most innovative script creations.

This episode is perfect for digital marketers looking to leverage automation for better campaign performance. Topics discussed:

  • How to benefit from ad scripts if you don’t know how to code
  • The best way to learn scripting for non-coders
  • How scripts fit into a PPC automation strategy
  • Some of the coolest scripts our panelists have written

Episode Takeaways

How to Benefit from Ad Scripts If You Don’t Know How to Code:

  • Non-coders can easily utilize ad scripts by copying and pasting pre-written scripts, making it a user-friendly tool for automating PPC account management.
  • Beginners are advised to start with scripts that generate reports or send alerts rather than directly altering account data, minimizing risks and simplifying the process.

The Best Way to Learn Scripting for Non-Coders:

  • Start by exploring Google’s ready-to-use scripts to understand basic functions and settings. Modifying these scripts for specific needs can provide hands-on learning.
  • Engage with online communities, forums, and consider formal training to build a foundation in scripting tailored to PPC management.

How Scripts Fit into a PPC Automation Strategy:

  • Scripts are integral for automating routine PPC tasks such as bid adjustments, keyword management, and performance monitoring, enhancing efficiency and effectiveness.
  • They allow for more strategic management by handling operational details, enabling marketers to focus on broader campaign strategies and optimizations.

Some of the Coolest Scripts Our Panelists Have Written:

  • Scripts that monitor search query changes to quickly adapt and optimize campaigns based on trending data or anomalies in search behavior.
  • Dynamic scripts that manage price extensions, updating them in real-time based on changes in product prices or inventory, thus maintaining accuracy and relevancy in ad content.

Episode Transcript

Frederick Vallaeys: Hello, everyone. Welcome to another episode of PPC Town Hall. My name is Fred Vallaeys and I’m your host. So today’s topic is PPC scripts, Google ad scripts, Google AdWords scripts, anything to help you with automation of your PPC account management. Now, I’m obviously a huge fan of scripts. I’ve been talking about them for a very long time.

I’ve put many of my scripts for free on search engine land. What we wanted to do today was bring in a couple of other experts, some of the world’s leading experts on scripts themselves and people I’ve had the pleasure of speaking with and alongside at many conferences. So the goal for today is to give you an introduction to scripts.

So even if you don’t know how to program, you’ve never written a single line of code, scripts are still very useful for you. It’s as easy as copy and pasting. I will show you some scripts that you can get started with right after the session today, but then we have the experts on the call. So we also want to open it up to questions.

So remember we’re live. If you put some chats in the comments on YouTube or Facebook, we’ll be showing those on the screen. We’ll do our very best to answer them. So we got some great people on the call today. So let’s go ahead and talk about.

All right, so I want to welcome my guests today. The world’s experts on on scripts. Nils, I’ve got you right next to me on the screen, so we’ll start with you. Nils Roijmans from the Netherlands. How are you doing today? Oh, good. How are you? I’m good. Thanks for joining us.

Nils Rooijmans: Yeah, thanks for having me.

Looking forward to it.

Frederick Vallaeys: How are things in the Netherlands?

Nils Rooijmans: Currently, it’s amazing. It’s sunny actually in Amsterdam. Yes, it does happen. We have a great spring and summertime. So currently I’m sitting at the houseboat enjoying the view of the canals with the little boats and sunshine. So, it’s,

Frederick Vallaeys: It’s a good day.

And we also have Steve Hammer also known as The Hammer, joining us today.

Steve Hammer: How’s it going, Steve? Quite well, quite well. That dramatic intro, I, I was, I was worried I was going to have to, you know, get out the first person shooter kind of mode and we were going to start streaming a Call of Duty or something.

It was beautiful. I love it. Yeah, thank you. It’s a uplifting right. Then I noticed you have a gaming chair behind you. So I guess that’s, yeah, I’m a little bit, but more than anything I buy gamers stuff because if it can survive a gamer, it can survive me. Simple as that, you know, they push their equipment as hard as possible.

So I just buy all their stuff and figure it’s the best.

Frederick Vallaeys: And I guess it’s it in their chair for. Way too many hours a day. So exactly.

Steve Hammer: Yeah.

Frederick Vallaeys: So Nils we have your fun fact there. So you were selling search out on a CPM basis on Ilse.

Nils Rooijmans: That’s a long time ago. Yes. Yes. Back in the Netherlands, late 90s, I was working at a Dutch search engine, Ilse.

nl. That was before Google came along and, of course, took all the market share that we had prior to Google becoming the world dominating search engine. I was responsible for the search engine. Back then, we didn’t even have a business model for search engines, as in, we were part of a bigger media company that was you know, generating all kinds of content on the portal, as it was called, and the search engine was a way to attract the people to the portal.

And we were actually selling ads based on a CPM basis, the banner ads. But also search ads based on the CPM basis. So we developed sort of like a predecessor to, to a PPC advertising engine, like a Google ads or overture as it was called and go to back in the days, but yeah, we had our own software solution for that and we were selling it on a CPM basis back then.

That was that was quite interesting.

Frederick Vallaeys: Were you already on the technology side back then, or were you just more marketing?

Nils Rooijmans: Actually, I started off as a, from the technology side. I started studied artificial intelligence in the nineties. And after that, I decided to try to make use of this knowledge about intelligent machines to improve the the quality of the ranking algorithms in the search engine.

So that’s how I actually got involved into search marketing shifted from a technology guy to a sort of like a marketer.

Frederick Vallaeys: Well, it seems like you come full circle, right? But going back into scripts now,

Steve Hammer: there you go.

Frederick Vallaeys: What about you Steve? What’s your background like?

Steve Hammer: Well, I’m, I have one of the weirdest backgrounds I think possible.

Started as a chemical engineer, which of course makes perfect sense how you would get into search in the first place. Went back to school, got an MBA, And then went, went to work for a newspaper and much like a lot of other other folks in the industry at the time, they’re trying to figure out how to do a digital transformation.

And at that point, I had to learn everything I could ever want to know about and the beauty was that was doing it at scale because, you know, they’re the amount of content that they’re turning out is, is massive. So that threw me back into it and then. Since then, I’ve been everything from doing startups for matching and obviously my own thing.

Frederick Vallaeys: So was there any technology in that background of yours?

Steve Hammer: I’ve always been around it. It’s pretty interesting. You know, I’m not a programmer by nature or or anything like that, but I’ve always used it. Just in, in what I was doing although hilariously, like it was Fortran, even back in the days.

God, I’m old, aren’t I? You know, all of the, all of those languages were the ones that, that I was working with. So I’ve always been around it way more than, and literally my first job when I was in high school was actually programming in Pascal. So, but it’s never been my 100 percent full time job of of As a programmer, it’s just always sort of been a been a hack in, in general.

And knowing that as far as is why I know that everyone can do this.

Frederick Vallaeys: Exactly. Sometimes that’s all you need, right? As a take a piece of code, somebody else has written and then start hacking on it. Hey for the people watching tell us in the comments where you’re watching from, and I’m curious if any people watching have written scripts, have technology backgrounds Or are going to be more on the copy and paste side of things here.

Exactly,

Nils Rooijmans: because maybe that’s interesting to mention as well, because since both Stephen, I, and I imagine you as well, Fred, have a background in technology. For scripts, it’s really, it’s really not necessary. We can create our own scripts, of course, but even if you cannot, if you don’t know anything about coding, Even if you are afraid of code, you can still make make use of scripts and put them to Yeah.

Frederick Vallaeys: Talk a little bit more about that. Right. So why, why is it so easy? Like what’s the level of expertise that you find you need to be able to, to get started?

Nils Rooijmans: I think you already mentioned it. It’s just sim It is as simple as copy and paste, literally as in, there’s so many scripts out there. I think there’s currently, I think there’s over 500 scripts you can find on the web.

I’m maintaining a list and trying to discover them all, but I’m still not finished. But, yeah, there’s there’s hundreds of scripts out there that you can easily copy and paste and use use like within 10 to 20 minutes, you can have them running in your account. So

Steve Hammer: even

Nils Rooijmans: without any JavaScript knowledge, you can you can start using them.

Steve Hammer: Absolutely. I think even Google’s own scripts are a great place to start, right? The ones that are in the solution sections of their developers stuff they’re written, they’re well documented, they’re constantly updated or at least, you know, kept up to, up to snuff. So you, you can feel pretty confident about them.

And they’re not doing anything funny like sending Verification to a third party server or doing anything that’s shady by any stretch that you would ever have to worry about with those. You know,

Frederick Vallaeys: have you actually run into that? Have you seen scripts that try to steal information?

Steve Hammer: I haven’t, you know, it’s one of the beauties, I think, of the the scripts community in the first place, everybody that’s involved with it and everybody that posts is doing it.

Very altruistically, right? It’s the hacker part of my head that goes into that there could be a problem with this, but I’ve literally never seen it. And, you know, if you see like code base 64 or something that just makes no sense in a script, you know, just to run the other way as fast as you can, but those, I’ve literally never seen one at Nils of you.

I you’ve, you’ve got a bigger list than I do this. It’s like.

Nils Rooijmans: No, I haven’t seen examples of actually sharing like data from your account with third parties. But what I have seen happening is that people use custom integration. I think it was Russell Savage who documented how to keep track of where your script is running in which accounts your script is running by pinging Google Analytics.

So you could use Google Analytics to track what other accounts are running your scripts. You might, you might, I’m not sure if you want to use that, but a lot of scripts are using that as well.

Frederick Vallaeys: And I think that code is no longer working. I tried to use it a couple of weeks ago, but out of the box it didn’t work anymore.

And by the way, Russ Savage, so he was the guy behind Free AdWords Scripts he kind of stopped contributing to that site and we took it over. Hoping that we contribute more to it, but we also haven’t been able to do that. So would you make it a joint effort? Yeah, exactly. We should. We should make it a new resource, right?

But that also kind of brings up the point that with a script. So you have a list of 300. It’s always tricky because not all of them will still work because Google changes how things operate. And so unless you’re. Actively maintaining those scripts. They may just fail to do what they’re supposed to do. How do you deal with that? Like, do you guys have a schedule that you go back update scripts or do you kind of figure they’re going to expire? And

Steve Hammer: I was going to say from, from our own perspective. Even the ones we run, we run and maintain we’ll see, you see them break. So then you can go back and update them yourself, right? Everything I’ve written that, that isn’t that, that extensive of a list we’re probably running it. So you can see, you can see if it breaks in that regard, but the broader list and things like that it’s not uncommon for me to see somebody put stuff in the comments.

The beauty though, is I think in the last year or so, I don’t think there’s been a single update to. Anything in scripts,

Frederick Vallaeys: right? And that’s because the the API is transitioning for Google. So they have a new Google ads API, and that was supposed to be what we were using, but then it was massively broken or too slow.

And they pulled back on that. But as they are transitioning to that, they also said, we’re not going to update the old API anymore. And thanks to that, having been static now, since. September of 2018. It also means our scripts haven’t been breaking above, but as soon as they get back to the regular update cycles, it’s going to be roughly three or four times a year that we might have to make changes.

It’s been kind of nice, but the downside is that there’s been no new functionality.

Nils Rooijmans: Yep. Exactly. How long did we have to wait to actually get access to the price extensions?

Frederick Vallaeys: Right. So that’s one of the latest things they did add. Right. So talk a bit about that. The price extensions.

Nils Rooijmans: Yeah. So price extensions, of course, are very popular extensions that you can use in your Google ads accounts to display actual Prices, but prices tend to change quite often.

So if you have different products and your, your product owner or the marketer is changing the prices of the products because of inventory or competition, then you would like the price extensions to be updated with the most actual price. And up until I think six months ago, it was impossible to update them via scripts.

But fortunately now we can access price extensions via the scripts API. So we can use scripts to keep them in sync.

Frederick Vallaeys: Yeah. What I want to show here on the screen is where people go to figure out what is sort of possible with scripts. So we’ve got the Google ad scripts reference pages. So Niels, maybe talk us through, like how would you figure out price extensions if that’s available?

What’s your process like?

Nils Rooijmans: Right. So let’s see. You’re in the Google ad scripts reference. Documentation. So on the left side, you have a menu of all the different components within the ads app. And as you can see, there will be ad extension. So if you click on that one. There you go. And then prices. So for instance, let’s, let’s say a click on the price, the price builder, actually, which would create a.

Frederick Vallaeys: Yeah. And the deep link pages, for some reason, keep all coming back with no internet connection. Okay. But that’s good, right? So this is kind of the way that you figure out what might be available. And then once you get to that final page, it has a, usually a code sample or an explanation of how to use it.

And so for the people who haven’t used scripts so as you can see here, they connect with ads, keywords, bids, budgets, extensions all the different types of campaigns. So you’re shopping campaigns, video campaigns. Search campaigns, display campaigns, they handle placements. So it’s a fairly exhaustive list, but it’s not everything, right?

So something to

Nils Rooijmans: be honest, this, this is rarely, this is a very selling me my, my starting point. Actually, I just used to Google search engine for this. So for instance, if I would be interested in updating price extensions via scripts, I would do a Google search on Google ad scripts, price extensions. And most probably that will be a listing from the Google Ads Script support forum.

That already has an answer on how to access the price extensions via scripts, but I’m not 100 percent sure if it,

Frederick Vallaeys: yeah, so we just search right there and we do come back. It’s the first result. So Google is working.

Steve Hammer: Yeah.

Frederick Vallaeys: I

Nils Rooijmans: didn’t

Steve Hammer: say that Nils is, I think that’s one of the cool things about scripts in the first place, right?

Isn’t it that we get this functionality and then we kind of figure out dozens of ways we can, we can apply that menu across things. It’s, it’s the fun of it. And imagining the things you can do with it, like, Oh man, this is a pain in the butt for updating all of these prices all the time. And then you get the script that can do it.

Now you’ve, you, you’ve saved your time, but that use case gets really powerful.

Frederick Vallaeys: Yeah. So let’s talk about the ideation process. By the way, maybe at some point we need to have Ted GQ on the call and ask him what his workout regimen is for getting that nice six pack right there.

Steve Hammer: Yeah. He’s not on the COVID 19 plan.

Like I am. It’s just pounds during COVID.

Frederick Vallaeys: What is that? The COVID 19. COVID

Steve Hammer: 19. I’m going to, I’m, I’m going to

Frederick Vallaeys: 19, right? Sorry. Right. So yeah, what’s the ideation process, right? So when do you think about scripts as a, as a way to. Something you might even want to use. Right. So both of you, you run agencies, you do SEO, you do PPC.

At what point do you say, listen, we need to do this sort of strategy. We need to execute on this and it’s just taking too much manual work. We need to script it. Like what’s that process like?

Steve Hammer: that you just hit exactly the word that I like to use. This is taking too much manual work. It nine times out of 10.

It’s it’s brought about out of some level of laziness. On on my own part or otherwise, or just the ability to scale right? You know, for now, right now I’m doing a lot with search query reports and and pulling those down and making sure, you know, from engrams to to sort of, you name it because I’m worried so much about matching.

As of late and a lot of my clientele is business to business. So since I’m spending so much time in search query reports, I want them sent and automated to me and find easy ways to push them back. And that’s really where I’ve been focusing personally a lot on scripts. I just want to not to take the work load off.

Frederick Vallaeys: Who was it? Bill Gates, who said that he prefers to hire a lazy engineers because lazy engineers don’t like to do manual work, so they’ll figure out like the best process for scaling it and automating it. I guess that’s kind of what you’re saying, right? So yeah, be lazy. Try to get the computer to do the work for you.

One component of that, though, is that I think you have to have a process that’s really well defined. And process is so important, right? So if you say I download. That specific report. And then I do a V lookup on these columns and then I look for these metrics and then I put a filter on these metrics and that basically gives me my decision automatically.

And there’s no more like thought process at that point. That’s ideal for automation. That’s ideal for a script.

Nils Rooijmans: Yep, absolutely. Yeah. A hundred percent agree. And actually that, that formed the basis of my current company because I don’t run a traditional agency as in with an office building and people on the, on the.

On the floor. It’s like more like a remote boutique BBC agency with people working for me all over the world. But in order to manage the team, I needed to have like standardized process processes. So when I started building the company, I decided to document every almost every part of the account optimization process that I would like to use to service my clients.

And then when I finished the documentation, I started trying to automate as much as possible using using scripts. And that is actually a great strategy to come up with the best tasks to automate because then you know you’re not spending time building something that you’re never going to use like scripts that you can you can use for something that is a one time off in my experience.

It doesn’t always make sense to automate it.

Steve Hammer: Yeah, that’s kind of the worst mistake, isn’t it? When you, when you’re like, Oh, I’ve got a cool idea to automate this. And it turns out that you just could have done it that once. You spent, you know, 12 hours building the script.

Frederick Vallaeys: Right, but the other side, Yeah, and you’re probably going to go there as well.

But for Optmyzr, it’s like, wow, we have a really cutting edge customer who tries to do something. So we figure, let’s build a tool for it. And then, There’s probably others who would want to do this, except it’s been too time consuming, and then you can actually sell that solution. And so as an agency, now you have a service that you can actually pitch because it’s not going to take you 17 hours to do that thing.

And now you can just automate it.

Nils Rooijmans: Right. And I think also on the other side, looking at the. What is possible using scripts you come up with, with other IDs to testing your accounts that you would not do because you simply do not have the time to do it manually. Like for instance, doing gram analysis is something that, that is very tedious and takes up a lot of time.

If you have a script doing it for you or you know that scripts can do it for you, you, the probability of you actually doing like that kind of analysis will increase if you have, the tools to do so. And

Frederick Vallaeys: that, to what degree have you found that your agencies have benefited from scripts?

Nils Rooijmans: I could not live without them. Definitely not. Same,

Frederick Vallaeys: same in terms of like how many fewer people that you have to hire more work that can be done automatically retaining more control performance. Do you, do you look at those metrics or is that kind of like, you just, you know, it’s working.

Nils Rooijmans: To be honest, I don’t really measure.

And I think the biggest benefit for me personally in my agency. Is that I do not have to worry about quality assurance of the work of my team, as in I know the scripts are monitoring everything. So if they make a mistake, the scripts will notice and they will immediately send out an alert to the people in the team, or if it’s if it’s a big mistake, then I will be alerted as well.

But that way I can easily travel the world. Well, I used to travel the world not these days, but I like traveling, so I want to be offline as much as possible, but I have to be sure that everything is, is, is in control. So I want to be alerted if something goes haywire. That is my biggest use

Steve Hammer: case. Warning that I’m, this, this will be a little long winded, so I apologize in advance.

We went to a new model. Pretty recently called cost per deliverable where we just charge people a fixed amount for things that we do. So we launched an experiment, that’s a cost, you know, that’s so many points and all that kind of good stuff. Scripts allow me to do that a lot more efficiently. And it’s not an hours discussion anymore.

It’s a, it’s a much a much more efficient way. And people love, at least our clients seem to love it from the perspective of, okay, I know I launched something. They don’t really care necessarily. How it got launched. They care that it got launched well and efficiently and whatever else. And then it runs efficiently.

Both of those things can can occur in this, in that world without having to have those discussions. And it allows me to take that expertise and actually Value it in, in a way that, that getting things to, to deliverables rather than time, right? Cause we only have so much time, but if I can push out an extra deliverable a day, that’s that much better.

So that’s, that’s how this works, if you will.

Frederick Vallaeys: Now, so when, when it comes to your agencies, is it both of you just writing the strips or do you. Have you hired people?

Nils Rooijmans: Oh, actually, I love, I love freaking out with scripts because you can, you can really get lost in them and have a lot of fun, but from like, if I’m also the business owner and from a business perspective, it doesn’t make sense for me to write the scripts myself because. It’s a real JavaScript developer.

I know how to code JavaScript. I wouldn’t say I’m the best developer, definitely not. And someone who’s doing it full time is way more productive in writing the scripts than I am. So from a business perspective, for me, it makes sense to out task writing the scripts. But since I enjoy it and I also want to be, you know, up to date with the latest features and possibilities, I tend to write, you know, at least one script a month just for fun.

Steve Hammer: Yeah, for me, it’s me. I generally write them and it’s not like Nils is right. I probably could be a lot more efficient if I hired somebody who is true javascript or or other things like that. But since most of them are bred out of my own sort of problem, if you will, more frankly, a lot of them are still copy and paste.

I’m I’m taking from the from the list that that’s out there as much as anybody else is. And that doesn’t take that much time. nearly as much time at all. So it ends, it ends up falling on my shoulders a lot.

Frederick Vallaeys: Yeah. And I think Nils, you were alluding to the fact that there’s a lot of JavaScript developers out there.

But one issue that I find is that JavaScript developers know how to code, but they have no clue about Google ads and the notion that there are campaigns that contain ad groups that contain ads and keywords. And then Those are attached to extensions. Like that is mumbo jumbo. That doesn’t make sense unless you work in this industry.

And that’s why it’s, you can almost spend as much time specking something out to that level of detail where they exactly know what to do. And so that becomes a question, right? So do you just write it yourself or do you spend all that time specking and then reviewing and potentially having to get them to fix it?

So like if you can find a JavaScript developer who also has done specifically Google ad scripts in the past, like that is gold because they know our world, they know coding. And they can just, and so, and so you can literally go to them and say, I need a keyword report and they’ll just know, Oh, well then they probably also need to know the ad group that the keyword lives in and the campaign that it lives in.

Because unless you know those two things, you couldn’t take that keyword or search term and make it a negative because you don’t know where to put that keyword. Right. So we, we find a couple of people that have those skills and it’s really, it pays off.

Nils Rooijmans: Yeah, I agree with that. So definitely, I think it’s, it’s it’s easier to hire someone who already knows the Google ads, JavaScript API libraries and the functions they can use and the methods,

Steve Hammer: but

Nils Rooijmans: is a mediocre JavaScript developer compared to like a real senior JavaScript developer without any knowledge of Google ads and

Steve Hammer: the API and the beauty of all of that.

And just to build on what you guys are saying is most of these aren’t 2000 line JavaScript programs, you know, they’re, they’re very small, very, most of the time, very basic to, to, to what some people are doing, you know, like what a react developer might be doing, they let, they laugh at what we do right by comparison.

So, you know, it’s a, it’s a, it’s a little bit different. In terms of the level you need. I think Nils, you hit it right on the head. A mediocre javascript programmer is fine. And that’s probably why I can do these.

Frederick Vallaeys: Yeah. And you know, one of the points that I keep making a lot currently is about automation layering and it’s sort of like when we think about automation in the PPC context, we’re so focused.

Fed all the, the inputs by Google about it’s machine learning. It’s artificial intelligence. It’s like super complicated, expensive stuff to build. But, but then, and so we’re, we’re saying like, Oh, should we build a bid management system, a bid management automation that’s better than Google’s? Well, no, I mean, you’re never going to be able to do that as a one man developer or a one woman developer.

Right. So, but what we can do is we can take Google who’s done some amazing machine learning. Bit management and we can put controls on that. So like Nils, you were saying, put a monitoring script in place that tells you if maybe that automated bidding system is going off the rails. Steve, I think in, in the many sessions that we’ve done together, you make one of the points that when you want to get started with scripts, start with something that’s reporting.

That’s that’s going to notify you. It doesn’t make changes. It just tells you something, right? It’s safe. It’s going to mess up your account. So that’s a really good place to start. And that’s automated layering because a lot of these scripts don’t have to be complicated. And, and we’ll go take a look at one of these scripts here in a minute to give people a, a sense of what it looks like.

So

so Nils, I’m opened up one of your scripts here. And by the way, all the URLs, all the scripts that we’re sharing, they’re gonna be in the show notes on the website later today. But, or you can search for it. You

Nils Rooijmans: recognize this one? Yeah, that’s actually one of my latest this idea came up during the, the, the covid crisis.

What I, what I saw happening in the search behavior. Of the search query reports in one of my accounts was that it would completely different search queries were entering the the reports and I was like, okay, these, these could be opportunities, or these could be things that we need to negate immediately because we’re wasting spent and I sort of decided that because this, you know, this dramatic thing happening in the world right now could have a dramatic impact of the search behavior of the target audiences.

We need to be alerted if something dramatic is changing in the search query reports. So that, that was the origin of the idea to write this script. So basically what it does, it does it has a look at the search query report for last week and compares it to the week before, for instance, last month to the month before.

And it reports search term with use discrepancies in

Steve Hammer: either

Nils Rooijmans: impression volume or click volume. And then you’ll get an email with a link to a Google sheets that shows the differences. And you can actually use it to start negating queries that show up but are completely irrelevant or use it in a way that you can improve the the performance for the search term by adding them as a keyword.

Or as some other person, Anna Borker, if I remember correctly, she actually used it to identify products to add to a smart shopping campaign. So she was using the script to to discover search terms that were trending in her client’s account and combined it with data in Google Analytics to discover products that were really relevant related to these trending search terms.

And she added these products to the, to a smart shopping campaign to see to actually take advantage of this incline in in the search volume. Which was a nice use case, I guess, so that is a way that you can actually layer these different automation systems together to improve the overall

Frederick Vallaeys: performance.

So let’s take a look at that script and go through it a little bit section by section because you said it can do many things, right? And so for context, here’s an example in Google Trends. It shows that searches for cancel my trip. Really spiked at the beginning of COVID. And so this was the, the example, right?

If you’re selling trips, selling flights, book a hotel bookings, like you don’t really want to pay for searches on cancel my trip, which all of a sudden shot up. But how do you know that that’s a trending search query? So that’s what the script does, right? So, but now to get started with this, you copy and paste this whole script into your Google ads account.

And then generally a well written script has a couple of sections, right? So you have your first section here. Having your configuration that is generally all people have to fill out for something to at least work at the base level. Is that is that correct?

Nils Rooijmans: Exactly. Yeah. So what’s happening here is that in green, these are the comments.

So it’s basically text that the interpreter ignores. It’s not part of the javascript code. It’s only there to explain what is happening. And then you have like three variables and the variables. You have to provide some value to it. So you have, in this case, you have to provide the spreadsheet URL that is being used as the output, and you have to add your email address that the script uses to send the alert to, and the email subject, which you can leave as is, but you can replace the XYZ with your client specific name.

All

Frederick Vallaeys: right. Right. And then you have that second section, which is sort of the optional changes.

Nils Rooijmans: Exactly. So these are, for instance, like the script ignores search terms that have less than 10 impressions. So it only looks at search terms that have the minimum volume, as you would say. And there’s lower limits to the relative difference.

So, for instance, If, if you had like a hundred searches impressions last week and now it’s a 98 and the difference is really isn’t significant. So let’s ignore that. But if the difference is above 20 percent then we include it in the sheet and we will send out an

Steve Hammer: alert.

Nils Rooijmans: And of course you can, you can change the thresholds depending on what you prefer and what you think is relevant for your account.

Frederick Vallaeys: Exactly. And then we get to the the stuff you shouldn’t touch. Below this line. And that’s the main code.

Nils Rooijmans: Exactly. Yeah. So this is if you’re not familiar with JavaScript, just don’t touch it, read it. I always recommend people to read the scripts. So actually, I do JavaScript and Google ad scripting training as well.

And one of the first things I do in the training is, of course, explain the basic concept of JavaScript. So if you’re really interested in learning how scripts work, that will be a great start to learn the basics of JavaScript. And once you understand the basics, you should be able to sort of like read the code.

And get a glimpse of what is happening. So you, you sort of get a feeling what the script is doing and that way you will either, you will both feel more comfortable in running the script because you sort of know what’s going on and you will also start to recognize opportunities to change the logic of the script.

to better suit your account specific needs.

Frederick Vallaeys: Yeah. So for example, here and Steve Wayne as well, if you want to, you know, suggest some changes to the script, but here we have the AWL query, so the AdWords language query and you notice that we’re pulling impressions, but if you wanted to do something that was based on not just like spikes and impressions, but spikes and clicks, you could probably go and change that.

Parameter right there, the metric to the clicks metric, right? So you would kind of do a fine and replace almost throughout the whole script. Fine for all the instances of impressions and change them with clicks. And 99 percent sure that that would. Probably work, right? There might be one or two things broken and the compiler would tell you like, Oh, well, in this case, we don’t recognize the word clicks because maybe Google calls it something else in that context, or maybe they use an uppercase or a lower case, that type of thing.

Nils Rooijmans: Right. And also what, what is, I think if you start thinking about scripts this way, it’s also very important to realize that you, Once you understand the difference between previewing a script and running a script, it’s, you’ll feel very comfortable in making minor tweaks and minor modifications to the, to the actual code.

Because if you preview it, nothing will change in the account. Previewing a script will definitely, will make sure that Nothing in your account is being changed by the script, so then you can actually start testing if your changes make sense.

Frederick Vallaeys: Steve, you were saying you’re a copy paster, right? So what would you, you would go to existing scripts and just kind of like pull out the functions and the sections that you like and recombine them?

Steve Hammer: Yeah, absolutely. Yeah, I think in blocks, which I think is the javascript way of thinking in the first place, right? This function does this that function does that kind of thing and letting things flow through Until you get all the pieces that in a lot of cases Those things are at least partially built already.

So you don’t have to start from from raw. So for example, the account anomaly script, which I think is a, it’s a classic, it’s a Google written script. It’s one that I run an awful lot. It’s really easy to adjust those, that script for the things that you’re looking for in your anomalies. Once you just understand a few pieces of it. And that’s, you know, that’s, that’s a pretty good basis. Like nil script right there. If I were modifying it, I would probably play around with Messing with looking for cost spikes in particular keywords. If those things were going on to do more or less the same idea. But some, some folks, you know, have their their concerns about that.

So you know, when everything’s going to one keyword, that’s when you start to worry. Right.

Frederick Vallaeys: And so speaking of anomalies, so it is a classic, it is available from Google. But when COVID started, that’s I got the idea that it’s no longer just about anomalies, but it’s also an anomaly at a certain geographic level, because literally from city to city, there’s different restrictions.

So it’s very hard for me to know if I was advertising for a business in a different state, like what’s actually happening there. Are certain search terms impacting what’s what’s happening? And so this is not even looking at the search terms. This is straight up metric success for each location Let’s look at the historical patterns for a typical tuesday And then let’s compare that to yesterday last tuesday.

And if that was more than 20 percent say different Then it tells you hey in san mateo county something is happening or in The Netherlands, the numbers are unusually good. And so now I know to go and do my investigation and maybe run one of your scripts on the search query report to figure out what’s happening specifically in that region that’s anomalous.

But what was cool about that is you took, you can take the existing script from Google, it can sort of add that new dimension of location to it. And produce something that’s completely new, but very, very relevant to today’s situation.

Steve Hammer: Yeah, absolutely. Even beyond today’s situation, this, this is a strategy I’ve seen before where competitors will come in and pick off a zip code, for example.

So you can see that in this sort of thing. It’s beautiful.

Frederick Vallaeys: Steve, let’s look at one of your pages here. So this is a bit old. 2018 makes Skaggs truly Skaggs. Let’s talk about account structure for a second and the script and the context. But so Skag is single keyword ad group.

Steve Hammer: Is

Frederick Vallaeys: this still something you believe in?

Steve Hammer: I didn’t believe in it even when I wrote the script. But even so it’s something that people people use and they believe in, and frankly, with matching the way it is, this SCAGS have been shot more times than everybody playing Borderlands three. It’s, it’s a pretty bad it’s a, it’s a pretty difficult thing to run these days I would say because.

You know, the, the, the exact dish match becomes less exact dish all the time, which means you get bleed over and in your single keyword ad groups like there’s no tomorrow,

Frederick Vallaeys: right? You’re talking about close variants, right? And so I’ve written scripts to that, look at close variants and specifically point those out and then, and now you can do cool things because you can do a semantic analysis, like how many characters are different between your original keyword and the close variant that Google showed you for.

And you can make a decision based on that. So you could say if it’s three characters or fewer difference, maybe it’s just a typo, maybe it’s misspelling. So that’s fine. We’ll keep it. But if it’s more than three characters different, maybe they’ve changed some of the words. And then I prefer that that doesn’t happen because I do want exact to be exact.

All right. So that’s, that’s a script that we put out there.

Steve Hammer: Yeah, yeah, good, good variance and bad variance, right? Like somebody flipped two letters on on thing or or put a parallel or put, you know, pluralize something. That’s no big deal. Those are the ones I actually do want. But somebody put in or dropped a word out of an exact match query and it still match.

That’s a problem,

Nils Rooijmans: right? Because because this touches on a theme that is I’ve been talking about and blocking about. Quite a lot lately in this, it’s that I love to use scripts to monitor what is actually happening in the Google AI, because as we all know, the Google AI is using machine learning to predict performance on clicks and trying to come up with a close variant matches that are sort of have like the same search intent and hopefully the same conversion value.

But as we all know, machine learning is. It’s learning, right? And we are paying Google in the learning phase by providing Google with the money and the data to actually feed the machine. And I always try to keep track on how good the AI is doing a job for my specific account, because I do, I do think that Google has well, Google is trying to optimize the performance for the whole ecosystem.

And as in they trying to come up with solutions that will benefit most advertisers, but that does not necessarily mean. It will benefit your specific account. So I like to use scripts to monitor what is actually happening in my specific account. And if the AI goes haywire, I want to be alerted on that and take action on it.

So for instance, with the closed variants, I’ve created the script to monitor the performance of the real exact keyword versus the close variant. And if there’s a significant difference in the performance, let’s say the cost per acquisition or the ROAS. Then I get an alert. So let me that this close variant is performing way better or way worse than the real exact match keyword so I can take action on that.

Steve Hammer: Yeah, yeah. It’s a great example

Nils Rooijmans: of actually layering these different types of algorithms to to make the most out of it.

Steve Hammer: Yeah, it’s easy for us to get on a soapbox and say it’s all bad. By the way, it’s not, we, we learn a lot from, from the systems and we see opportunities that come in from these things all the time. But it also can be a challenge at times, especially we do a lot of business to business and like one word can be very specific in the order that things are, that are used, you know, milk, I always use the example, milk, chocolate and chocolate, milk are very different things, but in exact match variants, they kind of match the same.

Frederick Vallaeys: Yeah, that makes sense. So I guess that’s a little bit about your favorite scripts. Any other favorites you got right now?

Steve Hammer: Those have been some of the big ones that I’ve been pushing a lot. The anomaly scripts, the exact match variants for us are some of the big the big ones, because the search query reports have just been so important in terms of our, our performance I’m going to flip that question a little bit.

Fred, the bidding script ones. Nice headband. Are ones that I don’t use nearly as much anymore. Yeah. This is,

Nils Rooijmans: this is the, the sun is setting in Amsterdam guys. So this is me trying to see you guys. It’s a funny, yeah.

Frederick Vallaeys: Okay. Come over here. Come to California. The sun.

Steve Hammer: I mean, not nails. I’m just coming up. Yeah, the bidding scripts now are ones that I’m using a lot less which I

Frederick Vallaeys: let’s talk about that for a second, right?

So we actually get that funny question that Optmyzr. So people come to us and they say, well, you know, automated bidding from Google. Why don’t we just use that? Like, what should I still do? And it’s like, okay, even if you’re automated, Okay. Bidding like your queries still matter, right? Because you get all these close variants and Google is trying to automatically bid for those.

But and in the case where it’s not a really good close variant, they probably bid less for it. But if you could look at that and say, well, that’s clearly a bad close variant, like. Just get that out, make that a negative keyword and, and in a way you are improving your per, you are certainly improving your performance kind of in a roundabout way, going through bidding without actually touching.

Bidding. Yeah. So there’s all other things you can still do. You have to think about it holistically, right? You can’t just say like, now I’m doing bidding and now I’m doing budgeting and now I’m doing a text. Like AdWords is a pretty holistic thing and everything’s more and more interconnected.

Steve Hammer: I think that’s a great way of looking at it.

The interconnectivity of AdWords is the power of it. Nothing is isolated in terms of that. It’s one of the things that I think is a bit of a challenge. Because our incentives are we want to only show up on relevant queries too. Right. And our ability to get that data and get the irrelevant queries out and teach that system.

We’re very much aligned in that between Google and an advertiser. Right. So, you know, that’s why I spent so much time in search query report type. Things wrap the bidding and let let the bidding do what it needs to do

Frederick Vallaeys: and then budgets. That’s another one. I think people are still very much into managing and Google still doesn’t really do the best job of that because they still don’t even really do monthly budgets, which is the way most of our clients would think about how we spend money.

And then accelerating, decelerating budgets as we get closer to the end of the month and maybe have some, maybe we got some additional budget we need to spend. And now we need to figure out where to allocate that in the most efficient way. And so the budget keeping the budgets on track, that’s kind of a nice thing for scripts to do also because it’s fairly binary, right?

Most people will come in and say, listen, 5, 000 for the month that doesn’t really change. And then the script can just look at it and do the math. We got 1, 000 left and only two days to spend that 500 a day, right? It’s pretty simple.

Steve Hammer: Mm hmm. Yeah. And find the good place. Right. Not just any random place to throw things at.

You know, it’s one thing if you’ve got Silicon Valley startup money that wants to throw money at things, but generally speaking, everybody wants ROI on what they want to do. So finding the most efficient place to put it. Perfect for scripts.

Frederick Vallaeys: Talk briefly about scripts versus API versus other automations, right?

The mistake that I’ve certainly made personally was like you were alluding to you, you go down this rabbit hole, spend six hours writing this amazing script. And then you realize I should have just done it manually, but sometimes it’s not even manual. Sometimes it’s like, Oh wait, there’s an automated rule directly in Google ads that could have done that.

And specifically I built a script that would turn ads on and off for the weekend. And then I realized I could have done an automated rule. On Friday afternoon and Sunday night, that would have done the exact thing. And that would have taken me two minutes to set up. But sometimes you want to use the API because scripts timeout scripts don’t work on really massive accounts.

What does that look like for you guys?

Nils Rooijmans: Yeah, I think if you definitely, if you’re new to scripts, start experimenting with rules. Primarily because that will get you in the way of thinking about how you can use automation to help you manage the account and rules are relatively easy to set up. Of course, there is a downside of rules that they only run.

What is the current frequency? Once a day, once a day, right? You can run scripts like every hour and also with scripts, you have way more flexibility compared to rules. But for easy things like, for instance. Pause every keyword that had over a hundred clicks and zero conversions. So that way you can pause keywords automatically that do not perform.

That is something that you can really easily do using automated automated rules. And once you have experimented with a couple of these rules, you will most probably identify new opportunities to use automation to automate a lot of your optimization tasks. That is a great first step in getting started with with applying.

Frederick Vallaeys: My biggest frustration with automated rules is that they limit you to one date range and one scope of the thing you’re looking at. So you can’t really do relative comparisons and meals. Like you were saying with the queries, it’s really interesting to look at stuff that’s really gaining or really declining, but that requires two date ranges and an automated rule doesn’t give that to you.

Right? So now you’re limited to saying. Find me all the stuff with more than 50 impressions last week, but every week you see the same things. And what we want to see is what’s different and that’s not possible through. And that’s when you start looking at maybe putting a script in place, which can pull those multiple date ranges.

And then how you want to do this across Microsoft, Google, Amazon ads, Facebook ads, right now, we need to start looking at APIs that kind of pull into these various systems, bring it back together into one place. And, and, and especially with budgets, right? So if we find something is where there’s a, we need to spend a couple of thousand more dollars.

What’s the best place? While a script and its limitation is that it’s going to spend that money within AdWords, but maybe that wasn’t the most efficient place for it. And that’s when we started looking at APIs that can go across different hat channels.

Steve Hammer: Yeah, absolutely. I’m, I’m actually a big fan of, of, of a lot of the built in automations that are out there.

Again, from the bidding standpoint, they’re, they’re better than, than they have been in a long time. I used to fight them hardcore, let there be no question about it. Total control freak. We all did, we all did. But now I buy into them. They, they, they have a tendency to, to work a lot better than, than they used to.

I think that the systems have learned. And I, I think there’s a, I don’t want to call it Amazon ing something, but I think there’s a, there’s a level of the, the people monitoring what scripts are running, or, or at least understanding the use cases enough, where the best of the best are getting rolled into the main of things, right?

The, the, these are the terms that searches show up for is essentially a really, really light Ngram report, right? It doesn’t really have any data behind it. That’s what it is. That’s a, that’s a kind of a cool thing that it’s in the system now. So I tend to be pretty pleased about those, those innovations in there.

We’re not, we’re not very API friendly in terms of the, The stuff that we do for, for size and other things like that. The other thing I’d say between the two is there’s a learning process between scripts and automation. That’s kind of cool. Once, when you start running your own scripts, you understand how the automation works better. And you feel more comfortable with it. And vice versa. I think if you start running automations and you realize that the automation isn’t doing exactly what you want to do and you realize where the, The fault is, then you can write a script. I think

Frederick Vallaeys: one key point I heard you make, Steve, was you’re basically putting your agency at the cutting edge by being the one that develops things that eventually Google may put in the interface where it’s available to the masses.

But as an agency, you need to have a value proposition, right? And your value proposition is that you are pushing those boundaries. You’re ahead of Google in many ways. And Google being such a big organization, even if they want to do something, even if they know that it’s the right thing to do, it can take them years at this point.

Right. I mean, one script I’ve recently built is an experiment dashboard. Google is big on drafts and experiments and they show them in the UI. But if you have an MCC account and you’re doing 10 experiments in 50 accounts, you have to look at 500 pages just to know what’s going on. Like I’m certainly not going to do that.

Not even every week, right? So we just wrote a script that pulls in the experiment data, puts it all on the spreadsheet. Now I got one place that’s got my 500 experiments with the results right there. And I can see, Oh, this one seems to be doing really well. And then I go to that specific page to make a tweak to it or to end it or to promote it.

Right. And I’m sure Google knows this is not ideal in the UI, but I wrote that script six months ago and I bet you it’s going to be at least another 18 months before we see any of this in a, in the Google ads interface. Yeah, there’s a lot to it. I, the more complex the interface gets, harder it is to surface those things.

Steve Hammer: Right. And there’s, there’s a lot of complexity to interface. Everybody that, that I teach people to do is like, well, when they first look at it, just because you can do so much and extract the things you care about the most for you is powerful.

Nils Rooijmans: That’s why, why, why they had the AdWords Express, right?

Frederick Vallaeys: Yeah. Yeah. Nobody. Use AdWords Express, please. If you’re listening to us, it is, if you ever want to do automation, don’t use AdWords Express, don’t use they call it smart

Steve Hammer: use AdWords. Sorry. That was hard. All

Frederick Vallaeys: right. Good. So There’s not a lot of news this week, so I think we’re going to skip that. Usually we do a little segment about news, but we’re in the doldrums of summer, so not much is happening.

At least in the PPC world, the rest of the world, there’s a ton of stuff happening but we’re coming close to the end of time or the end of our time here on this call. So I want to give you each a chance to maybe talk about something that you’re working on, something we haven’t covered today that you think is important and then we’ll wrap it up.

So I don’t know who wants to. Go first.

Steve Hammer: I’ll go first. Cause it’s a passion of mine. We’re holistic in terms of of the way we view as an agency. And I think one of the beauties of where all of this is, is going in the, in the future is for us to focus a lot less on things like skags and account structure and the tactical stuff and have the opportunity to be better marketers.

So take the opportunity now it would be my one advice for the entire industry and. And got there and kill it as a marketer. That means going beyond just the messaging of what you’re doing or just the experiments. Reach into the product of the customers you’re working with. Make suggestions on ways to improve.

That’s part of marketing. Our chance to be consultants is here. Our chance to be more than just tacticians is here. So I, I think it’s one of the greatest opportunities I’ve seen in a long time. So take it

Frederick Vallaeys: wise words, be a better marketer. And by the way, for anyone who needs some help and is considering talking to the hammer, I think you guys won best small agency of the year.

We did

Steve Hammer: back. Yep. So somewhere I have the tile. I don’t know where it is anymore.

Frederick Vallaeys: But you have search awards small agency of the year. And I don’t know what you put in that study or the case that you submitted. Do you think it was at all based on doing scripts?

Steve Hammer: I think it was. It was a combination of things.

Actually, when we submitted for that, it was, it was, it was our whole. Sweet. Right. So it wasn’t just a PPC at the time. I think they’ve split that award out to things now. So we put in an SEO case study where we we were dominating a keyword and looking at the profitability of what people were doing.

We were talking about what we were doing in the scripts and educating and evangelizing at that time. We had a couple of PPC case studies in there. So it was, it was a really sweet. It’s a, it’s a really good And I think that’s the, the, the breadth of what we were doing at that point. That I think I think got us that

Frederick Vallaeys: nice.

Well, congratulations on getting that.

Steve Hammer: Thanks for doing it. We’re pretty pleased

Frederick Vallaeys: Nils.

Nils Rooijmans: Right. Yeah. So if I can do, I’d like to do a shameless plug on a new service I’m working on. Actually, when I do training for, for scripting, I I get a lot of questions on what scripts I should be using. Many people know there are many scripts out there, but.

They have a hard time figuring out what scripts make the most difference to their specific account. So I decided to sort of like create a scripts done for you service where you and I or the client and I will select up to five scripts and we install them together. So that way people without any coding skills or who are afraid of scripts.

Have the opportunity to actually start using scripts in their specific accounts and they have me to guide them to install and configure the the scripts that we both think would make the most difference to the specific accounts. So I’m really excited to be hopefully launching the service next next month and, yeah, people are interested. They can definitely get in touch.

Frederick Vallaeys: Sounds exciting. And I hope some of the scripts that people select are the ones that I wrote. Most probably. Would make me very happy. And by the way, since we’re on shameless plugs, I do have to put in the shameless plug for Optmyzrs. So we have a system, we call it enhanced scripts.

And so if you’d like to do scripting, we put a generic piece of code, a snippet. In your scripting section in the Google ads account, and that basically connects to our service and through our service. That’s where you enable the scripts you want to run. You put in the settings through a nice form based you I so you never have to touch a single line of code beyond just copying and And pasting a snippet into your ads account.

Very similar to what you would do for Google Analytics. So it is the no code way to do scripting. And then we also have a tool, a capability that we call the rule engine. So that is more of a drag and drop based flow builder. That’s very similar in what it can do to scripts, but it it gives you full customization.

And so you can really create those those automations anyway that you see fit. And again, There’s no code involved from your end. So that’s all from Optmyzr. So good. Well, thank you both for joining me and talking about scripts. This was fun. I miss talking to you guys in person at conferences. And you know, I actually saw it, right.

My last trip I got to do before COVID was to the Netherlands. So we got to say hello to each other. And Steve and I were just talking that PubCon might actually happen in person. I. I’m not 100 percent sure. I’m not sure that I’m going to be willing to travel, but if it does, that’s usually where you and I will meet.

So looking forward to those days again. And thanks everyone for watching. We’ll be back again for the rest of August. We have episodes coming up another one on video. So the most popular one from last month, we’re going to run another session with Corey and Joe Martinez on video. And we’re also going to have google joining us in two weeks and they’re going to be talking about getting ready for e commerce in q4 with all your shopping ads so google is going to be on that call and we have two great shopping experts joining that call as well So join us for the next ppc town halls with our blog recap subscribe get all the resources on the website Nils steve, thanks for joining us and we’ll see you next time.

Steve Hammer: It’s a pleasure.

Nils Rooijmans: Take care guys. Thanks for having me

More Episodes