logo
  1. Inside the admin panel go to the Conversions page and select the Conversion which you would like to use to export as an event to your Facebook pixel.
  1. In the conversion menu, click Add Export.
    1. Image without caption
  1. Select Facebook in the window that opens and go through the authentication flow.
  1. After the authentication flow, you should see the Facebook export settings.
  1. Enter your Pixel ID (which can be found inside the Facebook Events Manager).
  1. Fill in the Event name for each conversion (we recommend keeping the event name the same as your conversion name within the SegmentStream platform).
    1. Image without caption
  1. Click Save.
  1. Conversions will be automatically exported to Facebook daily after data processing for the previous day is completed.
ℹ️
It might take up to 1 hour before you see the first batch of events from SegmentStream.

Cookies custom fields setup

By default, Google Analytics 4 doesn't collect any data about first-party cookies like _fbp. This cookie is required to send additional data through server-side conversion tracking.

If you are using GTM

  1. Inside your Google Tag Manager go to Variables, click New and choose the 1st Party Cookie variable type from the list:
    1. Image without caption
  1. Name your Variable fbp , input _fbp in the Cookie Name field and click Save.
    1. Image without caption
  1. Open your Google Tag, click Add parameter in the Event Parameter field, and enter the parameter fbp and the value {{fbp}}.
    1. Image without caption
  1. Click Save and Publish the container.

If you are using gtag.js

  1. Define a global function that will dynamically get the cookie value:
    1. javascript
      function getFbpCookie() { try { return /_fbp=(fb\.1\.\d+\.\d+)/.exec(window.document.cookie)[1]; } catch (e) { return undefined; } }
      It is important to have it as a function instead of saving to a global variable because sometimes cookie value might not be yet available (for example, Facebook Pixel SDK is not loaded).
  1. Add parameter to gtag config call:
    1. javascript
      gtag('config', 'G-XXXXXXXXXX', { fbp: getFbpCookie(), // other params... });
  1. Optional. Add parameter to all other events:
    1. javascript
      gtag('event', '<EVENT_NAME>', { fbp: getFbpCookie(), // other params... });
      Adding parameters additionally for events may improve tracking in case your gtag config call was triggered before cookies were set.