Create optimized Facebook Ads targeted at the right audience. With Profiles API and Segments, you can make a list of visitors who already access your website or are registered on your website and then send optimized Facebook Ads to them.
What’s the difference between this integration and Writing Job Results into Facebook Custom Audience?
Using Facebook Custom Audience requires user identifier information, for example, email or phone number. Profiles API integration enables you to send a segment to Facebook Custom Audience without such parameters. Instead, you use Facebook Pixel.
Basic knowledge of Treasure Data
Account of Facebook Business Account
Integrating TD Profiles API with Facebook using Pixel IDs
Navigate to Audience Studio > Profiles API Tokens.
Click New Token.
Complete the fields to configure the API token, including specifying a key column and the segments of customers to which you want to apply a personalization. Choose a key column, which is required to lookup a segment. In this example, td_global_id is selected. And, register a segment that you want to use with Profiles API. If the key you selected is associated with a segment, Profiles API returns the segment ID.
Save your token.
Get Facebook Pixel ID
Your Facebook Pixel ID is retrieved on your Facebook Business Account.
Refer to https://www.facebook.com/business/help/952192354843755
See more detail: https://developers.facebook.com/docs/facebook-pixel/implementation
The fetchUserSegments function returns associated segment ids when a visitor accesses your website. Adding the segment ids into the fbq function with
trackCustom parameter will send them to Facebook.
The parameters in the fbq function require; (1): Event Name (any), (2): Column name on Facebook (any), (3): Segment ID from the fetchUserSegment function
Because JS SDK v2 or later returns a difference response format from v1.9 or earlier, you must extract only segment ids from the fetchUserSegments function in an additional logic step. Then, you add the segment ids into the fbq function using the trackCustom parameter to send the ids to Facebook.
The parameters in fbq function requires; (1): Event Name (any), (2): Column name on Facebook (any), (3): Segment ID from the fetchUserSegment function
Confirm integration Status
Go to the Pixels in Events Manager section
Choose a pixel you integrated
Click Activity Menu, and then see the tracking target name you called using the fbq function
Create Custom Audience
After the data is stored on the Facebook side, you can create a custom audience by using the data.
Go to Event Managers and click Pixels.
Select your pixel.
Click Create Custom Audience.
Choose conditions for which you want to send ads
Select an event name
Select a condition (Ex. td_segment_id contains <segment id>)
Set your custom audience name.
Finally, you can see the status of your custom audience.