facebookfacebook-graph-apifacebook-pixelfacebook-custom-audience

Using facebook external_id with pixel and custom audience


I am wanting to link visitors who have visited my website and then have performed an offline task up within a facebook audience. I have set up facebook pixel to push a external_id when a user visits my site based on the users user_id

e.g

fbq('init', pixel.id, {
        external_id: "35d3652b57be5238df572b6074a7794d966e3be78b19b32f712d060c8da202d6",
})

(https://developers.facebook.com/docs/marketing-api/server-side-api/parameters/user-data/)

I have then set up a custom audience (Customer List) which is the audience I want to use.

I later call the facebook api to add users to this custom audience based on their external_id

{audience_id}/users with schema EXTERN_ID and an array of external id's to add. (https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences/)

Every thing seems to work and I can see in my facebook audience history that 9000 rows were added but the size still says "Fewer than 1,000"

Is there something I am missing here when using external_id?

Thank you


Solution

  • I was struggling with this one too. Try sending 'extern_id' in the pixel instead of external_id

    fbq('init', '<YOUR_PIXEL_ID>', {
      'extern_id': <UNIQUE_ID_FOR_THE_CUSTOMER>
    });
    

    as per the documentation here

    https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences/#external_identifiers