The Facebook/Meta SDK

Ayesha Akhtar
Ayesha Akhtar
  • Updated

Feature Snapshot

Summary:
Facebook Lead Ads are hosted entirely inside Facebook, and Facebook does not allow third-party scripts such as the TrustedForm Web script. Because of this, TrustedForm cannot directly record user sessions for Facebook lead ads.

To support lead verification and compliance, ActiveProspect has partnered with Meta to generate a special type of TrustedForm certificate—created only when leads are retrieved through LeadConduit’s Facebook Lead Ads Source integration.

These certificates contain Facebook-provided representations of the ad and form the consumer engaged with, along with key metadata required for compliance and auditability.

What Are Facebook Lead Ads?

Facebook Lead Ads are form-based ads embedded inside the Facebook or Instagram experience.
The user never leaves Facebook’s environment, and:

  • The form may be auto-populated by Facebook using the consumer’s PII
  • The ad and form are rendered inside Meta’s platform
  • Meta does not allow custom scripts—including TrustedForm Web—to run inside the ad

This makes Facebook Lead Ads fundamentally different from link-out ads, where:

  • The click sends the user to an external landing page
  • TrustedForm Web script can run
  • Facebook does not auto-populate PII

How TrustedForm Works for Facebook Lead Ads

Because Meta does not allow external scripts, TrustedForm uses Facebook’s API partnership to create a special TrustedForm certificate after LeadConduit retrieves the lead.

TrustedForm for Facebook Lead Ads certificates include:

  • Facebook-supplied images of the ad
  • Facebook-supplied images of the lead form
  • Auto-populated or user-entered PII (as provided by Facebook)
  • Advertiser metadata:
    • Facebook Page ID
    • Form ID
    • Ad ID
    • Ad Set ID
    • Campaign ID
    • Platform (Facebook, Instagram, etc.)
  • Lead submission timestamp

Interactive Replay

Instead of a traditional session replay:

  • A multi-page recreation of the ad, form, privacy policy, and thank-you page is displayed
  • The replay does not include user clicks or navigation
  • Only Image ad formats are supported
    • Carousel ads and video ads show “Unsupported media type”

What Facebook does not provide

Facebook does not supply:

  • Consumer’s IP address
  • Browser data
  • Operating system
  • Time on page
  • Typing speed
  • Click-level events

Insights Limitations

A TrustedForm Insights request to a Facebook Lead Ads certificate will only include:

  • Lead age
  • Created-at timestamp
  • Fingerprint matching
  • Partial page scan

No GeoIP, no browser data, no OS, etc.


Setting Up Facebook Lead Ads

The LeadConduit Facebook Router integration allows Facebook Page owners to deliver leads into specific LeadConduit flows in real time.

Setup Requirements

To connect a Facebook page to LeadConduit, you have to access three different settings interfaces on Facebook, based on how your Facebook leads are managed:

  • Business Manager settings for you (if you have a Facebook Business Manager set up): you must be a full admin with access to the pages and CRMs for the pages, among other permissions.
  • Business Manager settings for the page (if you have a Facebook Business Manager set up).
  • Business Integrations under Settings on your personal Facebook page. Setting permissions here is necessary because you are using your personal credentials to connect LeadConduit to the page that contains your lead ads.

Your Facebook account must have the following permissions (formerly all included in “Manage your Pages”):

  • Manage your ads
  • Show a list of Pages you manage
  • Access Leads for your pages
  • Manage accounts, settings, and webhooks for a Page
  • Create and manage ads for your Page
  • Read content posted on the Page

These permissions ensure that LeadConduit can subscribe to your Lead Ads events, process incoming leads and generate a TrustedForm for Facebook Certificate. Disabling any of these permissions may cause LeadConduit to lose access to your leads, or may cause “Malformed Certificate” errors when attempting to view or retain/claim TrustedForm for Facebook certificates.


Connect a Facebook Page to LeadConduit (or Connect More Pages)

  1. Open your LeadConduit flow editor → Sources tab. If this is a new flow, please make sure to click the Save button now.
  2. Click the Add Source button.
  3. From the Select a Source or Integration section search for Facebook and choose the Facebook Lead Ads Inbound Routed integration.
  4. Follow the prompts to connect LeadConduit to Facebook.
  5. A list of possible pages to connect will be provided.
  6. Pages connected to a different flow will include a yellow dot adjacent to the connect button.
    • If you choose to connect a page to a flow that was previously connected to a different flow, the previous connection will be broken in favor of this new connection.
    • Please Note: While one Facebook page can only be connected to a single LeadConduit flow, a single LeadConduit flow can have connections to many Facebook pages.
  7. Make your connection choices and select Next.
  8. You’ll be prompted to confirm your changes.
  9. Save changes to your flow.

Disconnect a Facebook Page

Follow the same steps as connecting, but uncheck the connected Page.
Remember to Save the flow.

Note: Removing a Page does not remove the Facebook Source from the flow.


Standard & Custom Facebook Form Fields

Standard Fields

Most standard Facebook form fields are automatically mapped.

Exceptions requiring manual mapping:

  • work_email
  • relationship_status

Other commonly used optional fields must be manually added to your flow:

  • Phone 2 (Work Phone)
  • Company Name
  • Country
  • DOB
  • Gender
  • Marital Status
  • Military
  • Platform (Facebook, Instagram, etc.)

Custom Facebook Form Fields

When a form includes Custom Fields, you must supply field mappings.

How to map custom fields:

  1. The easiest way to get the Custom Field ID is to submit a test lead after connecting your Facebook page to LeadConduit.
  2. Open the lead in LeadConduit → Technical Details
  3. Search for facebook_field_data_apros, then find the custom field ID. For the following example, the Custom Field label is “how many ads do you run in a month?”


  4. In your flow editor → Sources tab. Find the Facebook Lead Ads source, and click the corresponding button under the Field Mappings header.
  5. The left-hand value will be the LeadConduit Field receiving the lead data and the right-hand value will be the custom Facebook Field ID. Using the above facebook_field_data_apros as an example, this Source mapping will capture the value three to the “Ad Type” field for this lead:


  6. Paste the custom Facebook Field ID into the right-hand value field and click the Insert {Field ID} button.
  7. Save your flow and resubmit the lead in LeadConduit. You will now see the custom field with the rest of the lead data.

If LeadConduit is still not properly processing the custom field(s), you can chat with support within LeadConduit during business hours to resolve any field mapping issues.

Routing Leads at a Form or Ad Level

The Facebook Router RUI only supports Page Level routing. Once a lead is received by a flow, Form and/or Ad level routing can be accomplished using flow rules.

Disconnected Pages & Reauthorization

LeadConduit will lose access if the Facebook user who connected the Page:

  • Changes their password
  • Loses Page permissions
  • Has Business Manager permission changes

To fix:
Disconnect → Reconnect the Page in LeadConduit.


Facebook Business Manager Note

If your Business Manager has custom Leads Access:

  1. Go to Business Manager Settings
  2. Scroll to bottom → Integrations → Lead Access
  3. Select the Page
  4. Under People, confirm you have access
  5. Under CRMs, assign:
    LeadConduit Lead Ads Integration

More details are in the Facebook Advertiser Help Center.


TrustedForm for Facebook Lead Ads Certificates

Each Facebook lead generates a unique TrustedForm certificate, which includes:

  • Facebook Lead ID
  • Multi-page recreation of the Facebook ad and form
  • Data collected in the form
  • Consent language
  • Lead submission timestamp
  • Facebook Page ID
  • Facebook Form ID
  • Facebook Ad Set ID
  • Facebook Campaign
  • Claim history (when retained)

Benefits of Retaining Facebook Certificates

Retaining/claiming certificates allows:

  • Verified authenticity
  • Storage of all appended fields
  • Access to multi-page recreation
  • Programmatic fingerprinting
  • Access to the share URL

Limitations for Existing TrustedForm Customers

Facebook certificates do not support:

  • GeoIP filtering
  • Masked certificates
  • Several web-certificate features

You may need to add a nested flow rule to exempt Facebook leads from these filters.

Always store the certificate URL in your CRM for later access.


Sample TrustedForm Facebook Certificate

Sample TrustedForm Facebook Certificate (Ad)

Sample TrustedForm Facebook Certificate (Form Questions)

Sample TrustedForm Facebook Certificate (Privacy Policy)

Sample TrustedForm Facebook Certificate (Thank You Page)

Sample TrustedForm Facebook Certificate (Claim History)


Frequently Asked Questions (FAQ)

Q: Why do I see “Unsupported media type”?
A: Because video ads and carousel ads cannot be displayed. Only image ads are supported.

Q: Why do I get a 500 Internal Error when loading a Facebook certificate?
A: This typically indicates a permissions error accessing the underlying lead. Reauthorize your Page.

Q: Why is there no session replay?
A: Facebook does not allow third-party JavaScript and does not provide click-level interaction data.

Q: How long do Facebook Certificates have before they expire?
A: Facebook Certificates expire after 90 days. This is because a Facebook Certificate is only created when someone submits a form, and all certificates that are tied to form submissions automatically expire 90 days after that submission. So each certificate has a 90-day lifespan from the moment the form is submitted.


Glossary

Term Definition
SDK Software Development Kit – a collection of tools and documentation that enables developers to add specific functionality to an application.
Consent Certificate A digital record generated by the SDK that verifies a consumer has given explicit consent during the lead submission process.
Certificate URL A unique web address produced by the SDK which points to the consent certificate, serving as proof that valid consent was obtained.
Lead Form A webpage or interface where potential customers input their contact information to request more information or offers.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.