Client-side _fbc cookie overwritten by Stape Conversion API tag

Hi,

I am using Facebook client-side pixel together with the server-side tag (Conversion API) from Stape. The client-side pixel generates the _fbp cookie, and the _fbc cookie if a fbclid is present in the URL. However those cookies are usually created after the page_view event is already sent to the server. I’ve noticed that the server-side tag also generates an _fbc cookie if there is a fbclid in the url (in contrary to fbp cookie, there seems to be no option in the tag to enable/disable this for the fbc cookie), which overwrites the existing cookie created by the client-side pixel. By that time, the client-side pixel already sent the event with the old fbc value, leading to two different fbc values for the same event. I’m wondering if this could have an impact on the deduplication, as fbc is used for deduplication purposes?

Below is a detailed scenario to reproduce:

  1. (Clear all cookies). Load a page with fbclid parameter, e.g. Example Domain

  2. On load, a pageview event is sent to the server container, and the client-side pixel is executed.

  3. The client-side pixel generates an fbc cookie, and this is sent directly to Facebook. Here is a screenshot of the client-side request to Facebook (notice the fbc value):

  4. The pageview event sent to the server, does not contain the fbc cookie because it is not yet generated by the client-side pixel at that time.

  5. The server-side tag from Stape generates a new fbc cookie (because it notices the fbclid in the url), and it sends this back to the browser using Set-Cookie response header:

Notice how this fbc cookie is different from the one that is sent to Facebook via the client-side pixel.

My questions:

  1. The new fbc value overwrites the old value in the browser, but the old value is already sent with the browser event. This leads to a different value in the browser event vs the server event. Would this have an impact on deduplication at Facebook’s end and/or is there a way to circumvent/avoid this?
  2. I’ve noticed the server-side tag generates a new fbc, sending it to the browser using Set-Cookie response header, but instead of adding it also to the outgoing request to Facebook server, it appears to be completely absent in the outgoing request… why is that?

Thanks for the help.

  1. FBC has no impact on deduplication, it is not affecting it.
    1.1 the difference in two values is the timestamp, that is not really affecting anything because both values carry the original click_id (fbclid). See fbc structure here: Paramètres fbp et fbc - API Conversions - Documentation - Meta for Developers
  2. That is because cookie is not yet available at the time of the tag firing

If you want to be perfectionist about it, you need to make it so that your Pixel fires later than s2s tag, this can be achieved for instance with our Data Tag, that can push server responses back into the dataLayer. That way both _fbc and _fbp will be set by the server tag first, and by the time web pixel fires - it will already have those cookies present.