- 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.
- In the conversion menu, click Add Export.
- Select Facebook in the window that opens and go through the authentication flow.
- After the authentication flow, you should see the Facebook export settings.
- Enter your Pixel ID (which can be found inside the Facebook Events Manager).
- Fill in the Event name for each conversion (we recommend keeping the event name the same as your conversion name within the SegmentStream platform).
- Click Save.
- 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
- Inside your Google Tag Manager go to Variables, click New and choose the 1st Party Cookie variable type from the list:
- Name your Variable
fbp
, input_fbp
in the Cookie Name field and click Save.
- Open your Google Tag, click Add parameter in the Event Parameter field, and enter the parameter
fbp
and the value{{fbp}}
.
- Click Save and Publish the container.
If you are using gtag.js
- Define a global function that will dynamically get the cookie value:
javascriptfunction 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).
- Add parameter to gtag config call:
javascriptgtag('config', 'G-XXXXXXXXXX', { fbp: getFbpCookie(), // other params... });
- Optional. Add parameter to all other events:
javascriptgtag('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.