Search code examples
facebookfacebook-graph-apifacebook-javascript-sdk

How does Facebook convert fbclid to _fbc


I need the _fbc value but not from the cookie, so I need a way to convert the fbclid to the _fbc value and store it somewhere else to trigger the API conversion, but due to the coming changes to iOS I can no longer rely on the cookie so what is fbclid using to encrypt to the _fbc?

I've been trying to research on how to get the value but I have not found anything yet.


Solution

  • According to the Facebook dev docs: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc

    If you don't have the pixel installed or the _fbc cookie isn't available, then the fbc value is a combination of the version, subdomain index, the UNIX timestamp in milliseconds, and the fbclid value:

    fb.1.timestamp.fbclid-value