Documentation / Product / Integrations / Facebook

Facebook: Create Web Traffic Audiences

Target people who visit your website using the Facebook Pixel. Create audience definitions powered by Lytics that can be used as custom website audiences or lookalike audiences in Facebook Ads.

Integration Details

The client-side part of this integration uses the Lytics JavaScript tag and Facebook Pixel to sync users who are members of API enabled Lytics audiences. This will include anonymous users where the export custom audience integration can only sync known users.

Once a user visits a page of your website where both tags are installed, the following will happen:

  1. The Lytics tag will check for the existence of the Facebook Pixel.
  2. If found, the Lytics tag will retrieve a list of API Enabled audiences the current user is a member of.
  3. The Lytics tag will send this audience list to Facebook via a standard tracking event using the Facebook Pixel.

The server-side workflow of this integration uses the Facebook Marketing API to create custom website audiences in Facebook that are populated by the users synced through the client-side integration. After running the workflow, it will:

  1. Lytics will create Facebook Website Custom Audience definitions in Facebook Ads for the Lytics audiences selected during configuration. NOTE: This integration does not send the contents of the audience directly from Lytics to Facebook. The tag will send users as they are matched during web site visits so the audience will be smaller then what you see in the UI.
  2. If no audiences were selected during configuration, all API-enabled audiences for the account will be automatically created in Facebook. The workflow will run continuously checking every 5 minutes for new API-enabled audiences created in Lytics. If a new audience is found, a matching audience will be created in Facebook.

Fields

Lytics does not send any fields to Facebook as part of this integration beyond the event field necessary for recording audience membership. The workflow only creates audience definitions in Facebook Ads that can be used for targeting.

Configuration

Follow these steps to set up and configure the workflow to create Facebook website custom audience definitions in the Lytics platform.

Setting up the JavaScript Tags

  1. If you haven't done so 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.
  2. Also ensure that the Lytics JavaScript tag has been installed. This integration needs both tags present to work properly.
  3. Once you have added the tag and pixel to your site, enable API access for the Lytics audience(s) you would like to target.
  4. You can verify that Facebook is receiving Lytics audience membership via events. Use the Facebook Pixel Helper Chrome extension to help verify this: facebook-pixel-helper-2

  5. Proceed with the workflow steps below to make this user data available for targeting in Facebook.

Setting up the Workflow

  1. Navigate to the Integrations section and select Facebook. facebook 215
  2. Select Workflows from the menu on the left.
  3. Select Create Web Traffic Audiences from the list.
  4. From the Facebook Ads Account ID input, select the account ID for this custom audience. if it says you "must accept Custom Audiences Terms" next to the Ads Account ID, copy and paste the following URL into your browser: https://business.facebook.com/ads/manage/customaudiences/tos/?act=YOUR_ADS_ACCOUNT_ID. Replace YOUR_ADS_ACCOUNT_ID with the account id you wish to use. There you can accept the Facebook Ads Custom Audience terms and conditions, and then refresh this list in the Lytics App.
  5. From the Pixel input, add your Pixel to automatically create a Facebook Custom Web Traffic Audience for all public Lytics audiences.
  6. Click on the Show Advanced Options tab to expand the advanced configuration.
  7. From the Audiences input, select a set of audiences to do a one-time export to Facebook. If none are selected, a Facebook Web Audience will be created for every public audience in Lytics. facebook web audience
  8. Click Start Export to start the workflow.

You should now see the website custom audiences in Facebook Ads. They may already be populated if your audience was previously API enabled, or they may need time to populate as users visit your website. You can also build a lookalike audience with Lytics and Facebook based on these users.