Link Lytics to your Facebook marketing to target your ads to Lytics audiences.
- Creating a Facebook System User
- Target Known Users With Facebook Custom Audience
- Create a Lookalike Audience with Facebook Ads
- Target Anonymous Users with Facebook Ads
Before you can build a custom audience in Facebook, you must agree to the Facebook Custom Audience Terms.
After you have agreed to Facebook's terms, navigate to the Facebook integration in the Integrations section of Lytics.
Navigate to Authorizations.
Select which type of authorization to create. Facebook supports two kinds of authorizations: Facebook user auth, or a Business Manager System User auth.
- Facebook User auth will guide you through a Oauth process to authorize access to ad accounts tied to that particular Facebook user. Using Oauth is fast and simple, but can be prone to failure in the long run as authorizations can be cancelled if the user changes their password, leaves the org, and some other auth invalidating event.
- Business Manager System User auth is not tied to a specific user, so it is more reliable in the long-term and is valid until revoked in the Business Manger settings. This is the recommended authentication method if possible. See the detailed steps below to auth get a System User token.
If setting up a Facebook user auth, you will be prompted to login to facebook and grant permissions. You will then need to enter a description for your authorization.
If setting up a Business Manager System User auth, you will be prompted to input an Access Token and Description. See creating a Facebook system user for instructions on obtaining an access token.
- Click Authorize to save the authorization.
Creating a Facebook System User
Before creating a system user, your Facebook Business Manager must:
- Have an admin user.
- Own a Facebook app. You should claim the app and associate it with a business via API or in Business Manager. To see your apps, visit the Facebook Apps page.
Once you satisfy these requirements, go to Business Settings and complete the following steps.
- Under Users click System Users.
- Click +Add to create a new system user.
- Give a name to the system user and click Create System User.
- Assign ad accounts as an asset by selecting Ad Accounts. Then select the ad accounts that you would like to push Lytics Audiences to.
- Next you'll need to generate a token that'll be entered into Lytics to make API calls with. To start this, select Generate New Token.
- Select your Facebook app and make sure to give it ads management access.
- The generated token will be only shown once, copy this token and paste it into the Access Token text input in step 6 of the authentication process.
Target Known Users With Facebook Custom Audience
Export a Lytics audience to Facebook. Changes are batched to save API calls. See API Limits for details on Facebook's API limits.
|Exports to||Facebook audience|
|Name||Lytics + audience name, or custom|
|Identifiers||email, name, Facebook ID, first name, last name, gender, city, state, zip, county, phone|
|Audience Exports||selected audience|
|Type||add & remove|
You may have a Lytics audience you want to use as a Custom Audience. This audience can be used within Facebook as a target, a suppression group, or as a seed for a lookalike audience.
NOTE: Custom Audiences in Facebook consist of known users only. When selecting a Lytics audience to use from this export. Make sure the audience is made up of known users (users who have an email address).
- Navigate to the Facebook integration in the Integrations section of Lytics.
- Select the Export Audience workflow.
- Select the authorization you created in the authentication step.
Configure your export to include the Ad Account ID you want, the audience with known users, and any other required fields:
- Facebook Ads Account ID: Select the Ads account you wish to export audiences to. If it says "must accept Custom Audiences Terms" next to the Ads Account ID, you must accept the Facebook custom audiences terms of service for that account before you can begin exporting.
- Audience: Select an audience of known users (users with an email address) to be exported as a custom audience.
- Email Field: Select the user field which represent's the user's email in your account.
- Audience Source: Select whether data was collected directly from customers, directly from partners, or from both.
(Optional) Toggle the advanced options for more configuration settings.
- SHA256 Email: Select a user field containing the SHA256 hash of the user's email address.
- Audience Name: Enter the name of the custom audience you would like to create in Facebook.
- Audience Description: Enter the description of the custom audience you would like to create in Facebook.
- Opt-out Link: Opt-out link to be used for the audience in Facebook.
- Existing Users: When checked, Lytics will export existing users to the custom audience in addition to new incoming users. This option is selected by default.
- User Fields: You can choose to export a number of additional user fields to Facebook, including:
- First Name
- Last Name
- Lifetime Value: Selecting a lifetime value field will change the list from a normal custom audience to a value-based custom audience. See Advertiser help center: Customer Lifetime Value for more information on value-based custom audiences.
Click Start Export, and the custom audience should be immediately visible in Facebook in your Audiences. It is important to note that Facebook takes time to match the audience to their users. In most cases, the audiences is available for advertising / suppression / lookalikes within 10-60 minutes.
Create a Lookalike Audience with Facebook Ads
Follow the steps on targeting known users With Facebook custom audience to export a Lytics audience to Facebook.
After you have exported your audience to Facebook, navigate to Create Audience > Lookalike Audience in the Facebook Ads Manager.
Complete the required fields:
- Source: Select the audience to replicate.
- Country: Select the country to target.
- Optimize for: Optimize for more similarity or a larger reach.
Click Create Audience.
- The new audience will now be available for you to target.
Target Anonymous Users with Facebook Ads
Anonymous audiences can only be shared on pages where both the Lytics tag and Facebook pixel are placed.
If you have not already, add the Facebook pixel to your website. See Facebook's documentation for assistance adding the Facebook pixel and adding the Facebook pixel using Google Tag Manager.
After you have added the tag to your site, you will need to enable API access for the audiences you would like to target.
Verify that that Facebook is receieving Lytics Audiences. You can use the Facebook Pixel Helper Chrome extension to help verify this:
Navigate to the Facebook integration in the Integrations section of Lytics.
Select the Create Web Traffic Audiences workflow.
Select the authorization you created in the authentication step.
Fill out the required fields:
- Facebook Ads Account ID: select your Facebook ads account ID from the dropdown.
- Pixel: select you Facebook pixel ID from the dropdown.
(Optional) Toggle the advanced options for more configuration settings.
- Audiences: select which audiences you want to export. If none are selected, all audiences that are API enabled will be exported by default.
Click Start Export to begin the export. This takes data collected from the Facebook pixel and creates Lytics audience rules on that data that can be used by Facebook web traffic audiences.
Now navigate to Audiences within the Facebook ads manager.
Create a Custom Audience from Web Traffic.
From the dropdown labeled All website visitors, select Lytics Audiences.
Search for the API-enabled audience ID you want to target and adjust your lookback window.
Set the audience to contains to true. You can also add a second audience if you would like to target multiple audiences.
Name the audience and click Create Audience.
You are all set to target these users with Facebook Ads. You can also build a lookalike audience based on these users. See instructions on Creating a Lookalike Audience with Facebook Ads above.