Skip to main content
Some campaigns require more precise optimization than simply firing Facebook pixels on form loads. This integration uses Facebook’s Conversions API (CAPI) to send server-side events directly from Pingtree, giving you better attribution and match rates. Use this when you need to:
  • Optimize ads toward offline conversions (e.g., successful sales, funding events).
  • Fire different events depending on which buyer receives the lead.
  • Track multiple funnel events across the same session (e.g., submission, sale, upsell).
This guide walks you through setting up Facebook’s Conversions API (CAPI) with Pingtree’s routing logic, and how to use stored identifiers like facebook_fbc and facebook_fbp to improve attribution and match rates.

Capturing FBP & FBC Automatically

When a lead hits a Pingtree-hosted form or funnel that includes a Facebook ad click, we automatically extract and store the following cookies: These values are attached to each lead object and included in any Facebook Conversions API requests made from Pingtree. Including these increases event match rate, which directly improves optimization performance in Meta Ads Manager.

Step 1: Obtain Access Token from Business Manager

To send events through the Facebook API, you must request to generate a token:
  1. Log into Facebook Business Manager
  2. Go to Events Manager
  3. Select the Pixel associated with the campaign
  4. Go to the Settings tab
  5. Find the Conversions API section
  6. Click Generate Access Token under Set up manually
Facebook/Meta Bearer Token Important:
Only users with developer privileges can generate tokens. Once generated, copy and store the token securely—it will only be shown once and expires in 60 days.
We recommend creating a recurring calendar reminder to rotate tokens, until we roll out automated refresh support. Reference: Facebook Conversions API Docs

Step 2: Determine the Event Trigger

Facebook conversion events can be fired from different parts of the funnel depending on campaign goals. Pingtree supports custom event triggers via postbacks, API events, and routing filters.

Available Trigger Types

You can map any standard Facebook event name — or custom events created in your Business Manager — to any Pingtree event. Here are common trigger points:
Tip: Buyer-based events let you fire different Facebook events depending on which buyer receives the lead. This is useful for A/B testing ad optimization across different buyer segments.
Facebook Event Static Field

Step 3: Send Events to Facebook

Endpoint:
Headers:
Replace {PIXEL_ID} and {ACCESS_TOKEN} with the appropriate values provided by the Business Manager.

Required Fields and Hashed Data

Facebook requires all personally identifiable information (PII) to be SHA-256 hashed before being sent. Pingtree handles this automatically via data transformers.

Pingtree Field → Facebook CAPI Mapping

Use these mappings to ensure accurate event payloads and maximize match rates across Facebook Ads.

Sample Payload


Attribution Accuracy Tips

  • Always include fbp and fbc if available.
  • Use real event timestamps in UTC to avoid time drift issues.
  • Don’t reuse old tokens — Facebook will silently reject or downrank expired tokens.
  • Consider hashing additional identifiers (first name, last name, IP) to improve matching.

FAQ

Do I need extra consent to send hashed PII to Facebook? If you already display a consent disclosure or cookie banner and your privacy policy references Facebook Ads, you are covered under standard CAPI usage. Hashing PII before transmission complies with Facebook’s terms. Can I send multiple events per session? Yes. Pingtree supports triggering multiple events (e.g., form submit, sale, upsell) in sequence. Each event can be tied to routing logic or source filters. What if I want to suppress Facebook events for specific buyers? Pingtree supports conditional filtering at the buyer or source level. You can define postback conditions per route or event type.

Troubleshooting

To test your server-side events with Facebook, retrieve a test_event_code from your Meta Events Manager:
  1. In Meta Events Manager, locate the pixel you’re using and copy the test_event_code.
  2. Go to your Postback Setup in Pingtree (Source or Distribution).
  3. Scroll to the bottom and create a new Static Field:
    • Key: test_event_code
    • Value: the code you copied.
Once saved, use the Test Postback tool at the top of the Postback Settings page.

Testing Guidelines

  • Use a transaction_id tied to a real ad-clicked lead whenever possible.
  • If unavailable, construct the payload manually using known test data.
  • Use a SHA-256 hashing tool to hash sensitive fields like email and phone.
  • Use a current UNIX timestamp from epochconverter.com for the event_time field.

For implementation help, contact your account manager or reach out via Live Support in the Pingtree app.