Budgets actions using the Facebook Business Python SDK

Facebook Business APIFacebook Python SDKPython

Listing and changing the budget for Facebook using the Facebook Business Python SDK

Introduction

The Facebook Business API also comes with an SDK known as the Facebook Python Business SDK. This SDK has a few examples and objects in it that help developers manage ads and pages.

Before any of this can work for you there is the super fun hassle your organization will need to do to convince Facebook that your intentions are not full of any malice and that you will abide by their rules. This includes filling out several forms and even creating a video of what your actions are.

As we’ve submitted several applications over the years for different projects the time required to get approval has ranged from 3 weeks until yesterday when it took us less than 24 hours to get approval and access to the API. (We were blown away!)

Once you have gone through this you are now in a position to modify the budget using code! And this goes without saying: Anyone can mess up an Ads account but it takes a special person with API powers to really mess it up!

Connecting with the API

Initiating a connection with the Facebook API is part of the sample documentation but briefly here we will show how we connect up:

from facebook_business.api import FacebookAdsApi
app_id = 'YOUR APP ID'
app_secret =  'YOUR APP SECRET'
token =  'TOKEN FROM LOGIN'

FacebookAdsApi.init(client_id, client_secret, token)

There are three parameters you need to bring to the show. They are:

  • app_id : This is the app id you get when you create your application in Facebook.
  • app_secret : This is also found in Facebook.

The last one is the token. This can be generated with by going to the Facebook App Dashboard. Under the Products / Marketing API there is a selection called Tools. Here you can click Get Token after checking the permissions and be able to have a token.

Facebook Access Token

This can be placed in your python Script.

Accessing the Budget

To access the Budget there are two ways to see. From the Ad Set perspective, or the Campaign perspective. Most new budgets will now be at the campaign level as Facebook force all new budgets to be set at the Campaign level. The spin on this is that Facebook can now Facebook can distribute better than you can where your money is spent on the budget. The cynical viewpoint is that an MBA at Facebook realized by spending on unwanted ads can result in 0.01% profit increase, but spread across millions of advertizers, that ends up being at least a cool $1 billion.

Anyway, to get the budgets we have the following code:

account = AdAccount(ad_account)


fields = ['id', 'name', 'status', 'daily_budget', 'budget_remaining', 'lifetime_budget']

params = {
        'date_preset' : 'today',
        'effective_status': ['ACTIVE'],
        }
f_iter = account.get_campaigns(params=params, fields=fields)
for a in f_iter:
    print(a.__dict__['_data'])

The above code will get all the budgets from each of the ACTIVE campaigns.

The a in the iterator is an object of type Campaign. We can access properties with the fields.

We use the a.__dict__['_data'] field to get all of the values. The output would look similar to the following:

{'id': '23845378097660083', 'name': 'Campaign Name 1', 'status': 'ACTIVE', 'daily_budget': '5000', 'budget_remaining': '1982'}
{'id': '23845333911680083', 'name': 'Campaign Name 2', 'status': 'ACTIVE', 'daily_budget': '5000', 'budget_remaining': '2040'}
{'id': '23845277419070083', 'name': 'Campaign Name 3', 'status': 'ACTIVE', 'daily_budget': '12000', 'budget_remaining': '5274'}
{'id': '23845277290610083', 'name': 'Campaign Name 4', 'status': 'ACTIVE', 'daily_budget': '18000', 'budget_remaining': '6096'}
{'id': '23845232683160083', 'name': 'Campaign Name 5', 'status': 'ACTIVE', 'daily_budget': '10000', 'budget_remaining': '10000'}
...

Here we can see the daily_budget as well as the budget_remaining for the day.

This works well to grab all attributes of the Campaign object. But you could also just grab properties from the Campaign object. They are listed in the code (look at the Field class).

for a in f_iter:
	print(a['daily_budget'])

The more correct way would be to use the actual types:

for a in f_iter:
	print(a['Campaign.Field.daily_budget'])

This is how we can list things out.

You will notice that the values are about 100x the real values of the budget so you would need to do some division by 100 to get the actual budget.

Changing the Budget

Changing the budget is a similar operation. Here we just get the correct campaign_id and create a Campaign object from it.

c = Campaign(campaign_id)
out = c.api_update(fields=[daily_budget', 'name'], params={})

We can then see the result of this action by printing out.

Hopefully this gives you a good place to get started. At Castle Rock we do this every day. We are happy to answer questions for you or show you how to do it. Also, the Aderator is where we do all of this across multi channels with a super sweet dashboard.

fb dashboard

GTM Tracking with Sabre Synxis - Part 3

Google AdwordsGoogle Tag ManagerGoogle AnalyticsGTMSabreSynxisHotel MarketingHotel AnalyticsHotel Ads Spending

Integrating Sabre Synxis with Google Tag Manager, Google Analytics, Google Ads, and Facebook Ad Pixels - Part 3

Measuring Digital Advertising with GTM, GA, Facebook, and Google Ads with Synxis - Part 3

In part 2 we showed how to set up triggers in GTM for events that fire in Synxis. In part 1 we configured variables for GTM that allow us to get data from GTM into GA and go cross domain (between the hotel site and Synxis). In this part we’ll create several tags to track conversions across Google Ads, Facebook Ads and show these conversion in Google Analytics.

Facebook Tags

Let’s first track Hotel bookings that can be attributed to Facebook and Instagram Ads. When you set up your Facebook Ad, you’ll need to make sure you have added your pixel.

Facebook Ads Settings

This can be done in the Ad Set settings. You can target conversions on your website and then select the pixel. Then since we want the conversion event to be a purchase, select Purchase.

fb ads setup

Since you’ll also want Facebook Campaigns/Ads to show up in Google Analytics as well, on your ads you should put dynamic UTM parameters. This is at the end of each Ad configuration. We put ours as follows:

utm_source={{site_source_name}}&utm_medium=cpc&utm_campaign={{campaign.name}}&utm_content={{adset.name}}&utm_id={{ad.name}}

fb ads utm

The variables are dynamic and different for each ad. That way we can track each of the different ads on GA and see which ones are giving us the most conversions. The site_source_name will be ig for Instagram and fb for Facebook.

GTM Facebook Tags

Now we need to create the Facebook tags that will fire when someone purchase a room so that Facebook knows to attribute revenue to an ad.

In Google Tag Manager, create a tag called FB - RoomPurchase. For the Tag type, there are lots of ways to do this. We could create custum code, but why not build upon the work of others?

In this case we’ll build upon the great work of Simo Ahava. Last year, GTM introduced Custom Templates and he contributed a Facebook template that we can use that makes this so easy.

In Tag Configuration click on the Discover more tag types in the Community Template Gallery from here search for Facebook and you’ll see Simo’s brilliant work.

Simo Templates

Select the Facebook Pixel then Add to workspace and you’ll be brought back to the configuration menu. From here we can fill out the form as follows:

  • Facebook Pixel ID(s) - use the {{FB Pixel}} variable you created in part 1.
  • Check the Enhanced Ecommerce dataLayer Integration - This will then get all those events fed into facebook.
  • Even Name - Set automatically from the dataLayer.

Below, in the Triggering section, we’ll simply select roomPurchase from our previously created Firing Triggers.

Facebook Tag

As an exercise left to the reader, you’ll also want to set up a tag for Facebook page views. This is done using the same Tag type, but this time the trigger is simply a Page View.

You may also want to include things like AddToCart and events that we discussed in the previous posts.

Great! Facebook tags are in place and ready to test!

Google Analytics Tags

Of course now we want all kinds of views, purchase, ecommerce events to show up in GA as well. This is an easier process since the GA “template” already comes standard with GTM.

Let’s create the GA - roomPurchase. To do this, create a new tag, the tag type is Google Analytics Universal Analytics. The parameters are pretty easy now:

  • Track Type: Event
  • Category: Enhanced Ecommerce
  • Action: {{Event}} (this is a built in variable)
  • Google Analytics Settings: {{Google Analytics Settings}} (use our already preconfigured environment variable here.

The Triggering is the same as what we did for Facebook:

  • Firing Triggers: roomPurchase custom event.

GA purchase

So easy!

Again, you’ll probably want to set up the page view, addToCart, removeFromCart, etc, following the same steps!

Google Ads Tags

If you have not tied Google Analytics to your Google Ads you will want to do that and import the metrics into the account.

If you instead just want to use Google Ads pixels to track, you can put these in GTM as well.

From Google Ads, under Tools & Settings in the top menu bar, select Conversions.

gads

Here you can click on the big Plus icon and create a new one. We’ll select Website as our conversion we want to track.
In this part we can select:

  • Category: Purchase
  • Conversion Name: GA Room Purchase
  • Value: Use different values for each conversion
  • Count: Every

We leave the others as defaults. From here, create and continue and you’ll be presented with options to install this code. Since we have GTM set up, we’ll install with GTM! Clicking on this will give you a Conversion ID and a Conversion label. Make note of those, go back to GTM, create a new Tag and this time its of type Google Ads Conversion Tracking!

Filling out the form we can do the following:

  • Conversion ID: The value you just got from Google Ads!
  • Conversion Label: The value you just got from Google Ads!

Now here you may want to get more specific as we did.
For conversion value, order ID, and Currency Code, we took these straight from the data layer by hard coding in the actual data variable. We made three new variables of varible type Data Layer Variable with the following Data Layer Variable Name pulled from the Synxis data layer:

  • {{DataLayer-Revenue}} - ecommerce.purchase.actionField.revenue
  • {{DataLayer-OrderID}} - ecommerce.purchase.actionField.id
  • {{DataLayer-Currency}} - ecommerce.currencyCode

Even if most your customers only come from one country, you may want to do the currency code anyway so it tracks the value appropriately.

The rest should be old hat now, using the same Trigger.

GAds Conversion Tag

Testing

The next part is testing, testing, testing! You will need to put through some orders and then ensure that it shows up both in GA, FB, and Google Ads so it properly tracks. We usually go through a week of this making occasional tweaks in the different systems to make sure we are viewing things properly.

Once you have tested roll it into production and sit back and enjoy blissful tracking of ads as you see how people book, add rooms, etc.

Conclusion

In this three part post we configured Google Tag Manager for measuring events on Sabre Synxis. This is imperative for any Hotel that uses Synxis. The Hotel and travel industies, like most industries, are comprised off a highly digital component. On the sites we work on at least 50% of the bookings come from the hotel’s website. (The rest from phone booking, OTAs, etc). Understanding how your ads are driving bookings helps you know how much value you are getting for technology you pay for.

Setting this up, monitoring, and responding to events is also very much nore an alaytics game. Here at Castle Rock, our business is to take care of the analytics. We have been able to make our customers get higher than average ROAS even during times of uncertainty, like now, as we go through the COVID-19 Pandemic.

We would love to help you if you need any support setting up Ad Analytics for Synxis on your site.

If you have any comments, we’d love to hear from you!

GTM Tracking with Sabre Synxis - Part 2

Google AdwordsGoogle Tag ManagerGTMSabreSynxisHotel Marketing

Integrating Sabre Synxis with Google Tag Manager, Google Analytics, Google Ads, and Facebook Ad Pixels - Part 2

Measuring Digital Advertising with GTM, GA, Facebook, and Google Ads with Synxis - Part 2

In the last post we configured variables for GTM that allow us to get data from GTM into GA and go cross domain (between the hotel site and Synxis). In this part we’ll look at the triggers we should look at to process events.

Preview Mode

To see what events are being generated from the website, we can enter preview mode on GTM by clicking on ‘Preview’ in the top left.

preview mode

You’ll see a nice orange button that tells us that preview is enabled.

If you are using something other than Chrome, you will probably want to switch to a Chrome web browser to look at GTM events. It’s Google after all, and they would like you to use all their services, right?

Once you have it enabled, you should be able to navigate over to your website and see it show up in the bottom:

preview mode view

Under the summary portion on the left you’ll see the events that load.

From your hotel page, you should be able to now click on your ‘BOOK NOW’ or whatever you’ve set it to be to go to your Synxis site.

If you’ve set this right, you should still be seeing GTM events on the bottom half of the screen just like your hotel page. If you don’t see it, then the GTM code snippet is probably not enabled. Check your Synxis page source and make sure it is there!

Events

In Synxis when a person navigates to a page and makes a selection of rooms or adds the date to the cart, it doesn’t actually render a new webpage. Because of this we need to track events.

If you start adding reservations and checking out you’ll see a few events render. Here’s a sample:

When they select dates, and then select a Room, then select ‘Book Now’ you’ll see 3 events fire:

  • rooms.add
  • addToCart
  • checkout
  • checkoutLoad

events

As each of these events load, on the strip above you’ll see Tags, Variables, DataLayer, Errors(0).

If we click on rooms.add in the left side you can then check the Data Layer on the top portion of the debug tool and see all the variables that are loaded for us. Each one of those variables can be captured and analyzed.

rooms.add

This data can be added to variables if we want to get finely tuned data.
You should take this all the way through booking a room to see all the tags that are loaded. (hopefully you have a test setup with Synxis to do this!) In our Synxis system we see that it will say roomPurchase once a customer has actually booked a room on our website.

Adding Triggers

Back in GTM, let’s add a new Trigger. This trigger will simply run when the event roomPurchase fires. To make this happen we add a new trigger, select Custom Event from the Trigger Type, and then type in the name of the event: roomPurchase. It should be spelled exactly like it appeared in the GTM preview window.

Make sure it fires on all events.

purchase

From here you can add all the triggers that happen when an event fires in Synxis. This can help you capture data from all these events.

A few more that might be interesting:

  • removeFromCart - triggered when rooms are removed from carts.
  • click - triggered when other objects are clicked, like the dates. This can help you see what dates people are looking at mostly and capture the dates.
  • addToCart - This contains the different items they added to the cart, such as dates, room types, price, brand, etc.

While you can go crazy with this, the part we are most interested is understanding the people who actually did book. As people addTocart that can help you identify the funnel: How many addToCarts does it take on average for someone to book. You could then assign a goal number to that.

At this point we have one or more triggers configured with our variables. Now we need to add the tags and we’ll start capturing these events and be able to analyze them. We’ll do that in Part 3.

GTM Tracking with Sabre Synxis - Part 1

Google AdwordsGoogle Tag ManagerGTMSabreSynxisHotel Marketing

Integrating Sabre Synxis with Google Tag Manager, Google Analytics, Google Ads, and Facebook Ad Pixels

Measuring Digital Advertising with GTM, GA, Facebook, and Google Ads with Synxis - Part 1

Synxis is a web based reservation application that 10,000 plus small and medium size hotels use to fulfill their bookings. In many cases, you may go to the hotel website and see all the cool rooms they have. Then when you click the ‘Make Reservation’ or ‘Book Now’ button from the site, you’ll be directed to Sabre Synxis.
Synxis was acquired by Sabre for $40 million dollars in 2004.

Of interest to all of these hotels using Synxis is: How do I track my advertizing and marketing efforts and measure results? For example, if a customer sees your hotel Ad on instagram and then clicks to it and books, how can you trace it back to Instagram? What if they click on a Google Ad campaign, how do you know which campaigns are the most effective or generating the most bookings?

If you are using Synxis you’ll find there is lot of data you can use to make these decisions, including:

  • when customers select days,
  • add reservations to the cart,
  • create bookings
  • Remove items from a cart.

You can use this information to find which months most people are eying and make campaigns around them. You can also see when most people book, and what days are most effective. By finding which ads are the most effective you can double down on successful campaigns and pull back from the dogs. Facebook and Google of course won’t tell you that, they just want you to keep throwing them money.

Shameless Plug: At Castle Rock we recently went through this with one of our clients to help them set up conversion tracking and thought it would be helpful to others to document our efforts. We’re happy to help you do this as well, Contact us!

Here’s how it is done:

1. Google Tag Manager

Log in or Sign up for GTM

Sign up for a free GTM account at https://tagmanager.google.com. Once you get it set up, look at settings and you’ll see the tracking code that needs to be added to your site.

One Tag to Rule them all

The only tag required on Synxis is Google Tag Manager. Snyxis had us fill out a form and we only required GTM on there then they put it on Synxis for us. You do not need to put Facebook Pixels nor Google Analytics pixels on Sabre. If you are using Klaviyo or anything else, don’t put it on. You need one tag: GTM. GTM should go on all pages of the hotel website too. All other tags, like Facebook Pixels, etc will put placed in GTM.

GTM Variables

The first thing we’ll need to do is configure a few variables. These variables include:

  • Cross Domain settings
  • GA settings
  • FB Pixel settings

Cross Domain Variable

We’ll create a constant variable called Cross Domain. Here we’ll include the hotel site and the synxis.com URL. One hotel I found for example, that uses Synxis is limelighthotels.com. Let’s use them as our example. When we click ‘Book Your Stay’ on their website it takes us to gc.synxis.com with a bunch of config parameters. So we can then just put in our cross domain variable the two URLs:

limelighthotels.com, gc.synxis.com

Inside of GTM, go to variables and create a new variable called Cross Domains. This will be a constant and we’ll put the above string in:

gtm settings 00

Save this, and let’s now move on to the next variable.

Google Analytics Variable

Our Google Analytics variable will be used in tracking all our actions that get pushed to Google Analytics. To do this, create a new variable called Google Analytics Settings. This will be of type Google Analytics Settings. Notice the first one we did was a constant. This variable is a special type of Google Analytics Settings. It’s under the utilities heading towards the bottom.

gtm settings 01

Now let’s fill in the values. You’ll need your tracking number from Google Analytics. You can get this from your Google Analytics account under Admin / Property / Tracking Info / Tracking Code as shown below:

gtm settings 02

In our system it is UA-160151497-1

Next we’ll add the Fields to Set parameters. We’ll put allowLinker and set the value to true. This tells GA to treat these domains as one domain so measurements aren’t inflated.

Then down below in the Cross Domain Tracking we put the {{Cross Domains}} variable.

Finally, since Synxis has a rich datalayer it shows us we are going to enable Enhanced Ecommerce Features and get those variables from the data layer.

When done, our settings should appear as the picture below:

gtm GA Variable settings

Facebook Pixel Variable

As we’ll be using the Facebook Pixel for multiple events, let’s make a constant with that pixel value as well.
From Facebook, go to Business Manager and click on Events Manager. You’ll see a button to add new data sources. Let’s create a new Facebook Pixel to track web activities.

When you create the pixel it will try to be clever and add it directly to your website. You’ll see it offers choices to use a Partner Integration, Manually, or Email instructions to a developer. We don’t need any of those. Just hit cancel and admire the Pixel. You’ll see there is now a shiny Pixel ID for you!

gtm Facebook Pixel Copy the Pixel ID.

Back at GTM, create a new variable called Facebook Pixel, make it a constant and then add it in:

gtm FB Pixel Variable

At this point you have 3 variables:

  • Cross Domains
  • Facebook Pixel
  • Google Analytics Settings

gtm variables

In addition you’ve also got Cross Domain set up in your Google Analytics Settings.

In the next Post we’ll set up some Triggers we can use with Synxis to show some views.

Getting Started with Google Ads/Adwords API

APIGoogle Adwords APIGoogle Ads APIAIautomation

The Google Ads/Adwords APIs are complicated but you can do it!

We find the plethora of Google documentation for interacting with Google APIs quite confusing and thought we should clear up a bit of our learnings. Google seems to make the process complicated to weed out hobbyists and make it difficult for common shops to query their own data. We also understand the need to protect data and not let API keys roam in the wild and security is very important to take seriously. However, interacting with other platforms like Klaviyo or Mailchimp are far easier and in most cases you can get sample code running in less than 20 minutes. But fear not! Rewards await those who persist!

Perhaps you are thinking now: Well, maybe we’ll just automate our Facebook/Instagram marketing. Unfortunately the Business Manager Ads API approval process isn’t any better. In fact, Facebook requires you to create a video and send it in showing what you are going to do with the API!

But don’t worry, these three ideas below should help you get most of the way there:

Which API?

The first question when interacting with Google Ads is: Which API do you use? Today there are two APIs that let you interact with Google Ads. They are:

Not confusing at all right? The support documentation clarifies that Google Adwords API will be replaced with the Google Ads API. The Google Ads API, however, is in beta. After a few false starts last year it returned to beta due to some performance problems.

On our end we have been using the Google Adwords API, specifically the python library. In time we will migrate to the Google Ads API, but that probably won’t happen this year given we need something that works in production and not a beta API.

If you are just starting, perhaps using the Google Ads API would be the way to go, unless you are looking to manage a lot of accounts right away.

How to Connect?

The second difficulty with getting set up to use the Google Adwords API, or any future API is to get your application approved. This is another gatekeeping mechanism google uses to almost discourage you to use the API. We first applied around March 9th and received an email on March 11th informing us we weren’t approved. We probably had a few exchanges but the last go around of emails we have showed we were again denied on April 6. This time we kept at it giving them all the information they requested. The gatekeepers finally approved us on April 13th. Once we had this access we could finally use the APIs on our clients and our own accounts. Whew!

How to Test?

With Google Ads you need to create another account as a test account. This seems somewhat silly as the logical thing would be to just create a test account within your current Ads account. Nope. Can’t do that. We created a separate gmail account that we somehow were able to link with our Castle Rock account to be able to test different creations. This is one of the most important things that needs to be done as a developer for perfecting and trying out code. Before we ever launch something for our customers we always test it out on a test account.

If you’re like us, you probably searched inside the Google Ads interface thinking: “That can’t be right, why would anyone design it this way? The docs must be old, there must be a way to create a test account here in this interface.”

Nope. Not the case unfortunately. It’s 2020 and you still can’t do it. But fear not! A simple new account (to help increase the Gmail user numbers) will have you up. Just make sure you create a test account as you only get one shot!

Is it Worth It?

Absolutely. For anybody trying to manage SKAGs or more than one account it is essential. Digital Ad spending will only increase and more and more organizations will be using an analytical method to be more effective with their spending.

Google is all to happy to take your money if you want to give it to them on inefficient ads. For example if you are selling T-Shirts Google would love it if you only bid on the word ‘T-Shirt’. This is a common term and they’ll show your ad all day on that. Nevermind that people may be looking for ‘Make a T-Shirt’, ‘history of T-Shirts’, ‘Surf T-Shirts’, etc which may not be relevant to the T-Shirt you are trying to sell.

Having API access creates a feedback loop for creating more efficient ads. It helps you evaluate what you spent, where it was effective, and change allocation of funds to different more effective ad groups.

Help is out there

While we realize this process is difficult we are happy to help walk you through getting an API set up for your organization and customizing a solution that meets your needs. Castle Rock AI is focused on automating AI for digital marketing and we have a variety of ways to tackle difficult problems with an analytical approach. We are math people that specialize in working with creative folks. This is where the true power of connection with customers comes. While analytics, statistics and math is nice, you need true content to connect. Targeting the content to the right audience is where we come in!

SKAG Strategies

AutomationDigital MarketingAutomationAISKAG

Put a real SKAG strategy into place automatically.

A SKAG is a “single keyword ad group”. A SKAG is a method Google Ad gurus use to optimize Google Ads. The idea is that it saves you money and gets you more relevant targets for the ads you are serving up.

There are some great writeups on the method. KlientBoost has written the best one that I’ve seen. But there are also those that think SKAGs are outdated.

One of the core features of the Aderator is the ability to automatically generate SKAGs. There is some forms to fill out, but its less work than any other method to create them. Plus, we add the benefit of suggesting a bid price. Our strategy is simple: You pay less to Google to get more results.

The Strategy

The Aderator SKAG strategy works as follows:

  • Select a Campaign
  • Select the Keywords you think relevant
  • Create a template for the ad shown
  • Generate the SKAGs
  • Monitor Performance

Let’s explain each of these steps to make it more clear:

Step 1: Select a Campaign

Let’s assume you have a campaign running. That campaign will already have phrase match, exact match, and broad matches within it.

  • Broad Match - When some subset of our keywords are in the users search, our ad will show up.
  • Phrase Match - The keywords should be in the same order how the user typed them, plus some more text. So if we want to serve ads when the user types in “Big Blue Bus” then if they type “Big Honkin’ Fat Blue suede shoes Bus” then our ad will also sho.
  • Exact Match - Only if the user types in exactly what we specify. Nothing more, nothing less.

Obviously Broad matches will get your ad shown more. Then Phrase match, and Exact Match will be shown the least.

When we query all the search terms that set off our ads, then we can see which ones got clicks, which ones got conversions, and how many impressions each ad got.

Our SKAGS will now be built from this list of keywords!

Step 2: Select the keywords that are relevant

From this list you will see all the strange things people type, including misspellings, exotic searches and other things. It can be somewhat entertaining to go through this list.

You can select two things here:

  1. Terms you want to make SKAGs from
  2. Terms you want to negate

You may find there are keywords that keep showing up that have nothing to do with your business. Shut those off so you don’t spend money on this junk!

But the other words can be gold! Suppose you are selling disco balls. If your ads keep showing up for the game “Disco Elysium” you probably want to negate that keyword on a broad match.

However, if you find someone was searching: “where can I spend a lot of money on a disco ball” and you got 4 conversions out of it, then for goodness sakes, let’s SKAG that keyword!

Step 3: Create a Template for the Ads

The most effective SKAGs have the keyword in the Ad copy. We can make most of our ads the same, but have one part of the headline change to match.

For example, suppose I’m running an ad for high end travel. My company is called SuperDuperAdventures. I can make an Ad template that looks as follows:

SuperDuperAdventures | < keyword > | Luxury High Adventure

Then I can fill in that <keyword> with each Ad I create. This gives me a bulk way of loading ads. Obviously, we may need to refine a bit on some of them. For the “where can I spend a lot of money on disco balls” we might instead change that to be “Luxury Disco Balls”.

Step 4: Generate the SKAGs

At this point you’ll have to select which Campaign you want to put all of these SKAGs under. In the past, we normally select the initial farming campaign and append it with SKAG, or some other designation.

This part is all very time consuming if you do it manually. The point is, this is a simple exercise you can go through once a week looking at previous words that were generated from search results. Each week your campaign becomes more optimized.

With our SKAGs, we only put exact matches in, give the campaign a reasonable budget and over time take budget from the original farming campaign and move into the SKAG campaign.

This is impossible to do manually. However, using the Aderator can do this for you and allows you to spend 5 minutes a week optimizing.

Step 5: Monitor performance

There are two points to evaluate performance:

a. ROAS

How much revenue did you get for every dollar spent on advertizing? The goal is to have a big number. SKAGs can tell you this.
You may find that some SKAGs don’t pay off. For example, if you have a SKAG that is called: “How to make disco balls”, that may or may not be your market.

With SKAGs we should see in our campaigns higher ROAS than in the farming campaign.

b. Cost Savings

How much money did you not give Google? This is a huge number as well. We can evaluate this by taking the total cost spent on a keyword in the past. Every time that keyword is called in our new SKAG we can subtract the difference. This will show us how much less we paid Google for that keyword to render our ad. Since we are better targetted, the cost should go down.

Brief Aside: Sometimes you can ignore Google’s Recommendations

If you run a manual CPC campaign then Google may warn you that your ads will not show because you aren’t bidding enough. Well, it turns out they actually do. It is not ironic that the company that renders your ads wants you to pay up to a certain price for it to be shown. Certainly Google Cost Per Click has gone up over the years.

Beta Testers Wanted

This strategy outlined in this post is basically what the Aderator does for you. You plug it in, select your campaigns, and it goes to town every week adding new SKAGs and recommending keywords to shut off. This is the product we hope to launch soon. We’d love to know if you are interested in learning more about it. We’re also looking for several customers who would be interested in trying the product out before we get to general availability. If that sounds good to you, please drop us a line at[hello@

Digital Marketing Automation

AutomationDigital MarketingAutomationAI

Every organization needs an automation strategy for digital marketing.

In digital marketing we strive for all channels to deliver a consistent and engaging brand experience. If you have a retail store this should also be part of the entire experience. This makes your brand more powerful and engaging and helps you stand out from the noise.

Our digital strategy combines three channels:

  • Email campaigns
  • Search Engine
  • Social

Each of these channels requires thousands of man hours to optimize. Each channel is constantly changing. Each channel takes years to master.

Automating these systems as much as possible is the way you can turn your ad spend into big returns.

A Typical Scenario

Imagine you are launching a new campaign. You go into Google Ads and configure a new campaign, a new ad and guess a few keywords that might be relevent. Then you do the same with some new Facebook Ad Sets and a few key groups you think might be interested in the offering. Finally, you look through your email list and come up with some way to target the right people.
Once you set it, you have a few problems: Are you targeting the right people, how do you know? What channel is the most effective and how do you tell? What changes do you need to make to adjust the campaign to make sure it’s optimized?

Just worrying about this alone is enough to occupy the entire day, every day. You still need to come up with the right ads, a relevant landing page, and do your regular job. Even still you may not be getting it right.

Become Data Driven

The benefit of these digital marketing platforms is that they generate a ton of data. Data in turn can be useful for making decisions. The issue is the data generated by each platform is contained within that platform. Google Ads and Facebook Business Manager don’t offer a single place to retrieve data and analyze it. Your options can be to use Tableau or some other sophisticated tools, but that is more than most people can really do. Not to mention they are somewhat cost prohibitive. Another strategy we use is we store all of the data in a data lake that is then crawled by algorithms we’ve written to make sense of it.

The point is, future decisions on where and how you spend your advertising dollars should be driven by the data. If you aren’t using it, you are going to lose to your competitors who are using data to make the decisions.

Algorithms

Once the data is collected we can write simple steps that tell us: Which campaigns are successful, which are not. Then we can find better demographics. This is an iterative process that we can do every day with computers. They are very good at repetitive tasks. Once you have algorithms you can have several ideas of what you can do next:

  • Create a new campaign targeting men 18-24 years old on coastal cities
  • Make sure we only target mobile devices
  • Advertise only on the weekends on Google and advertise weekdays on Social Media

You can start to get very granular with your advertising. With this process we can save money on ineffective campaign words.

This also allows us to find new customers by analyzing the terms people are clicking on and the demographics of the people. Then we can understand our next steps.

Automation

Once we know where to go, we need to automatically update our campaigns, ads, demographics, and keywords. Both Google, Facebook, Klaviyo and other platforms have free “APIs” that allow computer code to talk to them. Getting access to Google and Facebook APIs is quite a complicated process and they don’t make it easy. However, given a few weeks you could get access and then a computer program could take the output of your algorithms and apply them to your campaigns.

One example we did: We had a generic farming campaign that generated a few conversions. Each time the conversion happened, we created a new Ad group from that keyword, turned it into an exact match, and negated the keyword from the former ad group it was in. We also knew how much we needed to pay for this keyword, saving 100s of dollars a day across several campaigns. We were also able to get very granular.

Repetition

The great thing about automation is that it doesn’t mind doing daily mundane tasks. Once a system is in place you can let it run for several weeks and evaluate the performance. We’ve seen dramatic increases in ROAS through analyzing giving us a 10x+ return in our investment.

The road ahead

Going forward you will need to have some sort of automation strategy for your digital marketing efforts. Many people use Ad agencies to perform some of these efforts. What we have seen is that a few of these agencies run a “set it and forget it” ooperation, updating Ads on a monthly to quarterly basis. We encourage you to speak with your ad agency and ask them how they are automating your campaigns.

At Castle Rock Data we work with agencies and clients to automate their ad spending processes. Our clients have been very happy with our work and we are looking forward to helping more people maximize their investment in digital ad spending.