Facebook Conversion API
Sesamy integrates with Facebook's Conversion API to send purchase events directly to your Facebook Event Manager, enabling you to track conversion values essential for optimizing your advertising campaigns.
Overview
The Facebook Conversion API allows you to send web events from your server directly to Facebook. This provides more reliable tracking compared to browser-based pixels alone, as it's not affected by browser privacy settings, ad blockers, or connection issues.
Benefits:
- More accurate conversion tracking
- Better attribution for your Facebook and Instagram ads
- Improved campaign optimization with reliable data
- Enhanced audience creation for retargeting
- Measure Return on Ad Spend (ROAS) accurately
Learn more: Facebook's Conversion API Documentation
Getting Started
Prerequisites
- An active Facebook Business account
- A Facebook tracking pixel created in your Events Manager
- Conversion API enabled for your pixel
Setup Process
Step 1: Set Up Your Facebook Tracking Pixel
If you haven't already created a tracking pixel:
- Go to Facebook Events Manager
- Click Connect Data Sources and select Web
- Choose Facebook Pixel and click Connect
- Name your pixel and enter your website URL
- Complete the setup wizard
Step 2: Enable Conversion API
Follow Facebook's detailed setup guide: Using the Conversion API
Step 3: Obtain Required Credentials
You'll need to provide the following details to your Sesamy account manager:
Required Information:
- Pixel ID: Your Facebook Pixel identifier
- Access Token: API access token for the Conversion API
How to find your Pixel ID:
- Go to Facebook Events Manager
- Select your pixel from the data sources
- Click Settings
- Your Pixel ID will be displayed at the top
How to generate an Access Token:
- Go to Events Manager
- Select your pixel
- Click Settings > Conversions API
- Click Generate Access Token
- Copy the token and store it securely
For detailed instructions, see Facebook's Get Started guide.
Step 4: Provide Credentials to Sesamy
Send your Pixel ID and Access Token to your Sesamy account manager. They will configure the integration on your behalf.
Security Note
Never share your Access Token publicly or commit it to version control. Treat it like a password.
Events & Data
Purchase Event
Sesamy automatically sends a Purchase event to Facebook immediately after a transaction is completed on your platform.
Data Payload
The following data is included in each Purchase event:
| Field | Description |
|---|---|
| The email address associated with the user's account | |
| Country | The country from which the purchase was made |
| IP Address | The user's IP address at the time of purchase |
| User-Agent | Browser details used during the purchase |
| FBC Parameter | Facebook Click ID - captured automatically via sesamy.js |
| FBP Parameter | Facebook Browser ID - captured automatically via sesamy.js |
| Currency | The currency used for the transaction |
| Value | The total transaction value |
| Transaction ID | Unique identifier for the purchase |
Automatic Parameter Capture
FBC and FBP Parameters are captured automatically when using:
- Sesamy.js library
- Sesamy web components during checkout
These parameters help Facebook attribute conversions to specific ad clicks and improve tracking accuracy.
Custom Implementation Notes
If you're using a custom checkout implementation (not using Sesamy.js or web components), you must manually add the FBC and FBP parameters as query parameters to the checkout process.
Example:
https://checkout.sesamy.com/?fbclid=123&_fbc=fb.1.123&_fbp=fb.1.456These parameters are typically available from the fbclid URL parameter (for FBC) and the _fbp cookie (for FBP).
Integration Features
Server-Side Tracking
All events are sent server-to-server from Sesamy's backend to Facebook, ensuring:
- Reliable delivery even if the user closes the browser
- Immunity to ad blockers
- Better data accuracy
- Compliance with privacy regulations
Event Deduplication
When using both Facebook Pixel (browser-side) and Conversion API (server-side), Facebook automatically deduplicates events to prevent counting the same conversion twice. Each event includes a unique event_id for this purpose.
Monitoring & Verification
Test Your Integration
After setup is complete:
- Make a test purchase on your platform
- Go to Facebook Events Manager
- Select your pixel
- Click on the Test Events tab
- Verify that the Purchase event appears with the correct data
Check Event Quality
Monitor your event quality score in Facebook Events Manager:
- Go to Events Manager
- Select your pixel
- Review the Event Quality section
- Aim for a high Event Match Quality (EMQ) score
Higher quality scores lead to better ad performance and attribution.
Troubleshooting
Events Not Appearing
If events aren't showing up in Facebook Events Manager:
- Verify your Pixel ID and Access Token are correct
- Check that purchases are being completed successfully
- Look for events in the Test Events tab (they appear there first)
- Allow up to 20 minutes for events to appear in reporting
Low Event Match Quality
To improve your Event Match Quality score:
- Ensure FBC and FBP parameters are being captured
- Verify that customer email addresses are accurate
- Check that IP addresses and user-agent data are being sent
Custom Implementation Issues
If using a custom checkout:
- Ensure
fbclid,_fbc, and_fbpparameters are passed to the checkout URL - Verify these parameters are persisted throughout the checkout flow
- Test with Facebook's Conversion API debugging tools
Best Practices
- Use Both Pixel and Conversion API: Implement browser-side tracking with Facebook Pixel alongside the Conversion API for maximum coverage
- Pass All Available Data: More data points improve attribution and audience quality
- Monitor Regularly: Check your Events Manager weekly to ensure events are tracking correctly
- Test After Changes: Verify tracking still works after making changes to your checkout process
- Respect Privacy: Ensure you have proper consent for tracking in compliance with GDPR and other regulations
Support
For assistance with Facebook Conversion API integration:
- Contact your Sesamy account manager
- Consult Facebook's Conversion API documentation
- Reach out to Sesamy support for technical issues