Documentation / Product / Integrations / Facebook

Facebook: Export Audiences (Web Traffic)

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.

NOTE: Since Lytics tag sends users as they are matched during web site visits, the audience will usually be smaller then what you see in the UI. A troubleshooting step for user verification would be to create an audience with web_visitor last visit within a specific recent time window (e.g. last 30 days).

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 job:

  1. Lytics will create Facebook Website Custom Audience definitions in Facebook Ads for the Lytics audiences selected during configuration.
  2. If no audiences were selected during configuration, all API-enabled audiences for the account will be automatically created in Facebook. The job 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.


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


Follow these steps to set up and configure the job 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 job steps below to make this user data available for targeting in Facebook.

Setting up the Job

  1. Select Facebook from the list of providers.
  2. Select the Export Audiences (Web Traffic) job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. From the Facebook Ads Account ID input, select the account ID for this custom audience. Note: If it says you "must accept Custom Audiences Terms" next to the Ads Account ID, copy and paste the following URL into your browser: 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.
  7. From the Pixel input, add your Pixel to automatically create a Facebook Custom Web Traffic Audience for all public Lytics audiences.
  8. 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.
  9. Click Start Export.

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.