Ad customizers were introduced about a year ago as a way to create targeted and dynamic ads without losing their ad history. The ads are much more dynamic than the original Ad Params, since they allow you to replace more than just numbers in your ads.
Of course, because they have more features, they are also a bit more complicated.
Today, we are going to look at a few ways AdWords scripts can help you work with ad customizers. Hopefully, it will give you some ideas of ways you can leverage scripts to make managing your ad customizers a little easier.
Quick Overview Of Ad Customizers
Managing ad customizers consists of maintaining data sources and also maintaining ads. We are going to try to write some generic code to do just that.
If you haven’t already, I recommend you run through this example in the AdWords Scripts documentation before you continue. Much of the code below is based on their solution but is a little more flexible (and probably more complex).
Ad customizers can be tricky to understand at first. After reading through the documentation, I still had a few questions about how they work in AdWords Scripts. Here’s a quick summary of what I found:
To use ad customizers in AdWords Scripts, you need to first define the data source used to manage the substitution data in your ads. Then, you need to create an entry for each row of substitution data.
If you’re familiar with spreadsheets, think about this as defining the spreadsheet name and columns for your data (the source) and then entering in each row of data to the spreadsheet (the items).
And just like with spreadsheets, updating the data in each cell is pretty easy, but changing the number of columns or their format can be tricky.
That’s why it’s a good idea to put some thought into the data source and the format you want to use for your ads.
Creating A Data Source
The AdWords help section has a great template that you can use to define your data source.
The special thing about this spreadsheet is the way columns are defined, such as “Model (text).” The name of the column is “Model,” and the type of data in that column is “text.” You will need to parse those column headers to create your data source.
(For more information on the types of data available, check out the documentation here.)
One thing that’s missing from that template is a “Custom ID” column. I couldn’t find too much information about this, but the Custom ID column is used when you need to update the information in your ad customizers, such as a price or some text.
Most likely, this is going to be the account entity at which you’re setting the ad customizer. For example, if you set it at the campaign level, your Custom ID column would most likely be the “Target campaign” column.
If you are setting things at the ad group or keyword level, due to the fact that those entity names can be repeated in multiple Campaigns, you will need to use either a combination of those fields or just an arbitrary unique ID.
No one will ever see this ID, so it’s completely up to you what you choose. Updating existing items using this ID will speed up your script dramatically.
So, what do you need for something like this? If you are going to be managing these ad customizer sources, first you need to grab all of them so you don’t try to recreate a source that already exists.
Here’s a simple function to create a mapping of source name to source, so you can easily find sources that already exist before you create them.
Now you can pull in the data from the spreadsheet and start to build your data sources.
The name of the data source comes from the name of the Sheet in the spreadsheet, and the fields and types come from the columns that are in the sheet. You could keep related data sources in the same spreadsheet under different sheet names with this code.
This code should be flexible enough to handle any data source you decide to create. At the top of the function, we defined some global variables to hold the URL of the spreadsheet, the column header of the Custom ID and a set of columns that should be ignored (SPECIAL_COLUMNS).
At the bottom of the previous code, you will notice a function that creates the individual ad customizer items for your data source. Let’s write that next.
First, you will need to gather all the current ad customizer items from the data source. Next, you can move through each row of the spreadsheet, either creating the item or updating the information in the existing item.
You now have a script that can easily create and update your ad customizers. Feel free to schedule this to run every hour. The full script can be found here.
Creating & Managing Ads
The last step is to figure out what ads you are going to create with this data source. Again, this is highly dependent on the type of data you are going to use.
I’m not sure about you, but I have a much easier time managing this type of thing in a spreadsheet than through the UI.
This quick and dirty script will read all the attributes for an ad from a spreadsheet and build them in your account. Just make sure the campaigns and ad groups are already set up.
Also, make sure you always have a default ad in the ad group that will be displayed if for some reason the substitutions are not available or the text substitution doesn’t fit in the ad.
Conclusion
Ad customizers can be a little tricky to wrap your head around at first, but they are invaluable tools for anyone running ads.
Creating and updating data sources can be quick and easy when you leverage the power of AdWords Scripts and Google Sheets. I hope this code provides a starting point for you to jump in and start customizing your ads.
The post Harness The Power Of Ad Customizers With AdWords Scripts appeared first on Search Engine Land.
No comments:
Post a Comment