Oct 6, 2020

Facebook Ads for affiliate marketing: using Google Analytics segments for Facebook ad targeting

8-MINUTE READ | By Michaela Linhart

Affiliate and Partner Marketing StrategiesFacebookMarketing Analytics

[ Updated Jan 17, 2023 ]

This is a tutorial for optimizing your Facebook Ads campaigns through better targeting. It’s especially useful for marketers who want hyper-focused campaigns that help minimize their costs. For example, if you’re an affiliate marketer and earn only a commission of the purchase price for each sale, your main concern is probably whether you actually make any profit.

The best strategy to use paid ads for affiliate marketing is to start small and focus on targeting only those segments that are most likely to convert. Successful ad campaigns require a proper organic foundation and effective landing pages.

You need to track your performance and analyze which campaigns, ad groups, and keywords give the best return on your ad spend. Once you know that, increase your budget for the top-performing segments and drop those low-performing ones.

You might know that the average CPC on Facebook Ads is lower than on Google Ads, for example. While this doesn’t say anything about the quality of those clicks, the purpose of this article is to show you how to improve your targeting on Facebook so that you can also keep the cost of your conversions as low as possible. 

How to improve your targeting on Facebook Ads?

Did you ever dream of using your Google Analytics segments which you are not only using for analysis reasons but also for targeting in Google Ads, Google Optimize, and Display & Video 360, for Facebook ad targeting? 

Without double tracking the data with Facebook Pixel or investing in a high-cost marketing automation platform?

Or did you ever dream of specifically targeting your Mailchimp, Shopify, or Stripe contacts with Facebook Ads? Or your CRM, DWH, or any other tool where you store your contacts? But those tools also have no connection to Facebook…

Now all your dreams have come true, thanks to the FBsync add-on for Google Sheets.

With this add-on, you can use all your contacts (if consent is given), no matter from which tool, to specifically target them with Facebook Custom Audiences.

You only need two simple steps (marked in red and green) and the use of Google Sheets: 

fbsync add-on for Google Sheets
  1. Get your contacts in Google Sheets using the Supermetrics add-on for Google Sheets. 
  2. Sync your contacts to Facebook using the FBsync add-on. 

Let’s have a more detailed look at those two steps, starting with the first one: 

1. Get your contacts to Google Sheets using Supermetrics

First of all, you need to bring your targeting data, i.e. your contacts, to Google Sheets:

fbsync add-on for Google Sheets step 1

Why Google Sheets?

Because of its great infrastructure.

Google Sheets 

  • is free, 
  • runs in the cloud and is always and everywhere available,
  • is well known by everyone (at least from Excel, so the changeover is easy),
  • is easy to use without any setup or explanation, and
  • has an app store: so you can make your life easier with add-ons like Supermetrics and the FBsync add-on. 

That’s why Google Sheets is the best way to go.

To get your targeting data to Google Sheets, install Supermetrics for Google Sheets and choose the connector from where you want to grab your data, e.g. Google Analytics. 

Tip: Go to the Supermetrics tutorial to learn how you can grab your data.

Which data do you need?

Actually, only your contacts in the form of their email address. 

The email addresses are important because Facebook mainly recognizes its users based on their email address. So, it’s a requirement from Facebook to have the users’ email address available if you want to target them on Facebook and Instagram. 

Email addresses available

Usually, you have the email addresses available in tools like Mailchimp, Shopify, Stripe, and also your own ones (database, CRM, DWH). 

So, just grab them via Supermetrics and create a schedule to refresh the data on a recurring basis, for example, daily, twice a day, or hourly. 

You are now done with the first step. Congrats! 

Email addresses not available 

Sometimes, you don’t have the email addresses available. This is the case with Google Analytics, for example. For privacy reasons, it’s not allowed to store email addresses in plain text in GA. 

Unfortunately, you need the email address if you want to use Google Analytics segments for targeting on Facebook. This is a requirement from Facebook.

So, what you can do is hashing each email address with the SHA256 hash algorithm and then store it in a custom dimension in Google Analytics. 

You only need one user-scoped custom dimension for that. Name it, for example, “UserId” and store the hashed email address for each user in this dimension. You get the email addresses wherever users enter it on your website like via login, contact or support forms, and newsletter opt-ins. 

Before you do this, please ask your data privacy officer if you’re allowed to do this. You need of course the consent of your users and clarify what you’re doing in your data protection regulations. 

Important: This also applies to all other tools where the email address is not available out-of-the-box, such as Adobe Analytics. You need to find a way to get the email address – in plain text or SHA256-hashed. 

It’s important to use the SHA256 hash algorithm because this is the only one Facebook is working with. It’s again a requirement from Facebook.

Now, you have the hashed email addresses of your users available in Google Analytics and you can grab them via Supermetrics. 

Who are these users?

Your new, silver, gold, or VIP customers. Your casual or loyal blog readers, brand lovers, or newsletter subscribers. Your cart abandoners, red or white wine lovers, voucher redeemers, … The possibilities with Google Analytics are endless.

Don’t forget to create a schedule to refresh the data on a recurring basis like daily, twice a day or hourly. 

You are done with the first step: Congrats! 

Further with the next one: 

2. Sync your contacts to Facebook via FBsync add-on 

Second, you need to send your contacts to a Facebook custom audience:

fbsync add-on for Google Sheets step 2

With Facebook custom audiences, you can target users who either get tracked via Facebook Pixel or are uploaded manually in Facebook Business or Ads Manager. As a third option, Facebook offers an API to automatically sync contacts to Facebook. The FBsync add-on uses the third option. 

To do so, you need the FBsync add-on for Google Sheets. 

The FBsync add-on is also a Google Sheets add-on like Supermetrics for Google Sheets. It’s available for free in the G Suite Marketplace, and it simply grabs all the contacts from Google Sheets to forward them to Facebook Custom Audiences. 

To create your Facebook sync, you need to go through 3 configuration steps:

adding new audience sync for facebook

1. Select your Facebook advertising account.

2. Create a new custom audience. For this, you only need to enter the name of your audience, such as Red Wine First Time Buyers – GA – 90 days. It is best to stick to your naming convention or that of your company. 

The add-on takes care of the rest: It creates a new custom audience for you with the name you entered and the advertising account you selected. 

3. Select the data source. The data source is the worksheet, the column, and the row in which your email addresses are stored. 

For example: Column A in Sheet “Red Wine First Time Buyers” and the email addresses are available from row 16, as you can see in the screenshot above. 

That’s it. Save your configuration and enable the sync. 

You can now see your configuration in the overview: 

adding audience for google analytics sync to facebook

Now, you have to wait at least 48 hours! 

It only takes a few minutes to sync the data to Facebook, depending on the size of the audience (max. 5 million). But Facebook needs up to 48 hours to correctly match the email addresses in its system. So, please do wait and only check your result after 48 hours. 

After waiting, you can check the match rate and the estimated audience size in the FBsync add-on (or directly in the Facebook back end). You also get a sync status. The status notifies you if your audience is too small (<1,000 contacts) or just right. 

A cool detail: The add-on automatically updates your audience hourly. It checks every hour whether new users have arrived and synchronizes the new ones to Facebook. It also checks if users dropped out and removes those users from the audience.

With the Supermetrics schedule and the FBsync, you just need to set up your sync once. Afterwards, the contacts get automatically synced to and removed from Facebook, and you can lean back and enjoy a cup of coffee.  

For more details on the FBsync add-on, take a look at this tutorial

How to benefit from the add-on?

The most important advantage is that with the FBsync add-on you can target any users from any systems in Facebook and Instagram. This is important because Facebook marketing is still the #1 channel for a lot of companies and also for many affiliate marketers—even if some experts already declared these platforms dead. They just work. 

Moreover it is super important to target the right people – those who you actually want to reach. The advantage is that you can reach more specific users if you take the contacts from your email platform, your CRM software, your database, and of course Google Analytics. With Google Analytics you can create highly specific user segments. And with the FBsync add-on, you can target them on Facebook, too. 

You may think that it’s kind of a workaround because you can reach the same with Facebook Pixel. And you’re right! Especially if you’re not using Google Analytics or any other analysis platform. But if you’re using an analysis platform, then you need to track everything twice: once on Facebook and once using the analysis tool. And that’s a lot of work. Both for you and for your developers. That’s why this way isn’t a workaround in fact. It’s the best way to sync your user segments to Facebook Custom Audiences. 

Now that you went through the tutorial, it’s over to you! And join the Supermetrics partner program to earn 20% recurring commissions from each sale. If you haven’t already.

About Michaela Linhart

Michaela Linhart

Michaela is a self-employed Digital Analytics Consultant in Vienna, Austria and a passionate Google Analytics blogger. See more of her work on her blog ANALYTICSkiste.blog. Before she has worked in the biggest performance online marketing agency in Austria and guides companies like T-Mobile and Red Bull, specializing in analytics setups for large corporations and Google Analytics 360.

Turn your marketing data into opportunity

We streamline your marketing data so you can focus on the insights.