Using a Facebook Pixel to create action-based audiences in Facebook Ads
This tutorial describes how to customize a Facebook Pixel to include the information required by the Paid Web Service, and how to convert a Facebook event into a people-based audience.
For more information about the Facebook Pixel, see Creating and installing a Facebook Pixel.
Make sure to include the following line in the <script> section of the pixel code:
The value of the AudienceName parameter is provided by the PaidAudiencesContainer REST service. This service returns a list of all paid audiences to which an individual belongs, that is, the latest actions selected for the individual by the Next-Best-Action strategy. For more information about the PaidAudiencesContainer REST service and its parameters, see "PaidAudiencesContainer REST service" in the Pega Marketing User Guide on the Pega Marketing product page.
- Install the Facebook pixel on your website.
- To verify that the pixel is correctly configured, generate some website traffic, and then log in to Facebook Events Manager, as in the following figure:
There might be a delay of several minutes before the events are created. For more information, see Navigate Events Manager for Facebook Pixel.
- To use the event data in your targeting, convert the events to Facebook audiences:
- Log in to Facebook Business Manager.
- Click Audiences > Create Audience > Custom Audience.
- In the list of sources, select Website traffic.
- In the Add people to your audience section, select your custom event, as in the following figure:
- Save the audience and use it in your Facebook campaigns.
The Facebook Pixel is now installed on your website and ready to gather information about visitor activity on your website, enriched with data about Next-Best-Actions selected for them by Pega Marketing. If you want to implement a Google Ads pixel, continue to the next section of this tutorial.