(gentle music)
- Unique to Google, it's possible to write your own code
and execute it within the Google Ads platform
to automate your campaigns.
Let's see how this works.
Let me click here into Tools and Settings.
Under BULK ACTIONS, we're going to go to Scripts.
This is where you can see all the different scripts
that you have running, as well as how often they run,
and whether they're enabled.
You can also click in Options
and then choose to Run the script or Edit it.
We're going to create a new script,
and we're going to use this script right here.
Don't worry too much if you don't know how to code.
This is really just to show you how the platform works,
so you can work with the developer
to write scripts for you.
Every script has a few different sections.
So first is the function, and that is called main.
It's always called main
because that's what Google looks for to execute the script.
Within the function, you have this section here,
which is the main script.
First thing you look at is the selection.
So this is selecting all of the campaigns
within the AdsApp, which is the Google API.
And then we're going to order them by cost descending
for the date range of yesterday,
and we're going to limit this query to 10
and then just get all of those campaigns.
The logger is something that allows you
to print to the console so you can debug
and see what the script has actually done for you.
Then this final section here is a loop, a while loop.
So it's saying while the campaigns have next,
meaning when there is another campaign in the list,
then select that campaign and then log
the cost for that campaign yesterday.
Okay, so don't worry too much if you didn't follow along.
This is just how a script typically looks.
So if I copy this script and then go to Scripts again,
click New Script.
So now I have my unnamed script
I need to copy and paste in here.
And again, make sure that it's in this function main.
The next thing I need to do is AUTHORIZE,
and then click Allow.
That's going to let you run the script ads yourself.
Once you have a script,
you can preview the script to see what it would do.
So let's click PREVIEW.
You can see that this script is running here.
If we go to the LOGS,
we can actually see what it's printed out.
So as expected, first, it printed out 10 campaigns
with most costs yesterday,
and then for every campaign with cost descending
printed out the cost.
So we can see here US Agency Types.
It was the campaign that spent the most yesterday.
We only scratched the surface here,
but you can imagine there are infinite possibilities
for automating your work with the Google Ads scripts.
So many possibilities for automation,
it can be hard to know what to start with.
In this lesson, we're going to cover
some of the most common types of scripts.
So the first one we're going to look at is a Link Checker.
What this does is when you configure it,
it looks through your whole account,
checks the links that you're linking to from your ads,
and then makes sure that they're not broken.
If it leads to a 404 or error page,
then it's going to flag that immediately to you,
so you can fix your campaigns
and not waste your advertising budget.
In order to use these scripts,
you just need to scroll down to the bottom,
and you can see the whole source code here.
You can copy it here and then paste that
into your Google Ads scripts.
Follow the instructions for set up and you should be good.
The next one we're going to look at
is the Account Anomaly Detector.
What this does is tell you if performance
has shifted drastically up or down in specific campaigns.
Again, you can configure this how you like.
There are lots of different interesting features.
If you follow this set of instructions
and copy and paste the script,
it's going to work in your account.
The final one we're going to look at is the Ad Customizer.
So this one's a bit more advanced.
What this allows you to do is to dynamically update
values in your ad text.
So for example, if you were selling concert tickets,
you could automatically update the prices
as they change in your product feed.
This one is a bit more difficult to set up,
but Google has written some pretty interesting information
about how this works.
If you can follow along, great.
If not, then I recommend talking to a developer
who can help you.
If you start with these three scripts,
you already have a pretty good foundation to build on
for further Google Ads automation.
(casual music)