Engagement Audiences for Lead Ads

Automatically create audiences for people who engaged with Lead Ads, this is known as an engagement audience.

Creating an Engagement Audience

You create an engagement audience by creating a Custom Audience with subtype set to ENGAGEMENT.

You should set object_id to <FORM_ID> and set the rule to track one of the following Lead Ads events:

Event Description

lead_generation_submitted

All users who completed the form and submitted it.

lead_generation_dropoff

All people who close the form without submitting it. They may or may not have filled in any of the fields.

lead_generation_opened

All people who opened the Lead Gen form regardless of whether or not they submitted the form.

The access token you provide to create an engagement audience must have at least an advertiser role on the Page that publishes the Lead Ads form.

use FacebookAds\Object\CustomAudience;
use FacebookAds\Object\Fields\CustomAudienceFields;


$audience = new CustomAudience(null, 'act_<AD_ACCOUNT_ID>');
$audience->setData(array(
  CustomAudienceFields::NAME => 'Lead Ads Engagement Audience',
  CustomAudienceFields::SUBTYPE => 'ENGAGEMENT',
  CustomAUdienceFields::DESCRIPTION => 'Users who submitted lead ad form',
  CustomAUdienceFields::RULE => array(
    array(
      'object_id' => <FORM_ID>,
      'event_name' => 'lead_generation_submitted',
    ),
  ),
));

$audience->create();
from facebookads.adobjects.customaudience import CustomAudience
from facebookads.adobjects.adaccount import AdAccount

ad_account = AdAccount(fbid='act_<AD_ACCOUNT_ID>')

params = {
    CustomAudience.Field.subtype: CustomAudience.Subtype.engagement,
    CustomAudience.Field.name: 'Lead Ads Engagement Audience',
    CustomAudience.Field.description: 'Users who submitted lead ad form',
    CustomAudience.Field.rule: [
        {
            "object_id": <LEADGEN_FORM_ID>,
            "event_name": "lead_generation_submitted",
        },
    ],
}
audience = ad_account.create_custom_audience(params=params)
curl \
  -F 'name=Lead Ads Engagement Audience' \
  -F 'subtype=ENGAGEMENT' \
  -F 'description=Users who submitted lead ad form' \
  -F 'rule=[{"object_id":"<FORM_ID>","event_name":"lead_generation_submitted"}]' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.9/act_<AD_ACCOUNT_ID>/customaudiences

For more information about custom audiences, see Custom Audience, Reference.