Facebook Conversion API Integration
Written By Stefan S.
Last updated 9 months ago

Vendors can connect Facebook Purchase conversion pixels to our Facebook Conversion API integration, allowing them to send related purchase data to Facebook pixel reporting once a customer makes a purchase.
Follow the instructions below to connect your FB ad/pixel account and trigger data events to send when a customer makes a transaction via a checkout.
NOTE:
This integration ONLY handles purchase conversion events.
To track visits to the checkout BEFORE purchase, add your FB tracking pixel script to the product CSS field.
Important Note
Passing Facebook Click Identifiers (Crucial Step)
For the Conversion API to accurately attribute a purchase back to a specific Facebook ad, you must pass Facebook's tracking parameters from your landing page to the PayKickstart checkout page.
When a visitor clicks your ad and lands on your website, Facebook provides two key identifiers:
_fbp(Browser ID): Usually stored in a browser cookie._fbc(Click ID): Usually stored in a browser cookie after a user clicks an ad. If the cookie is not present, this value must be constructed from thefbclidURL parameter.
Your responsibility is to capture these values and pass them to the PayKickstart checkout URL.
Passing the Parameters Correctly
The fbc parameter you send to PayKickstart is not simply the raw fbclid value from the URL. It must be correctly formatted according to Meta's specifications.
There are two primary scenarios for getting the correct value:
From the
_fbcCookie (Recommended): The easiest and most reliable method is to retrieve the value directly from the_fbcbrowser cookie on your landing page and pass it as thefbcparameter.From the
fbclidURL Parameter: If the_fbccookie is not available, thefbcvalue must be constructed in a specific format:version.subdomainIndex.creationTime.fbclid. This is a technical task that requires a script on your website to assemble the value correctly.
Example of a Correctly Formatted URL
Your website's logic should dynamically build the checkout URL. It should prioritize grabbing the _fbc and _fbp cookie values first, for example:https://app.paykickstart.com/checkout/sample-product-123?fbc={value_from_the_fbc_cookie}&fbp={value_from_the_fbp_cookie}
Note for Your Developer: Please ensure that the script on our landing page captures the values from the
_fbcand_fbpcookies and appends them to the PayKickstart checkout URL query string asfbcandfbp. If the_fbccookie is not present, thefbcparameter must be constructed using thefbclidfrom the URL, formatted as per Meta's Conversions API documentation.
Important: If these parameters are missing or incorrectly formatted, PayKickstart cannot link the purchase event back to the specific ad click. This will significantly impact your campaign's reporting and optimization capabilities.
Step 1: Platform integration
Step 1: Platform integration
STEP 1:
In your vendor account, go to CONFIGURE > INTEGRATIONS.
Once in the integration section, click the Misc section, then click Facebook Business

STEP 2:
Select Facebook Marketing and click Connect.
IMPORTANT: Log out of Facebook on your browser first, or ensure you are logged to the specific FB account you want to connect before clicking connect.

STEP 3:
You will be taken to Facebook to connect to your FB account. Click to continue to finish the connection.

After you finish connecting to your FB account, you will be taken back to the PK integration section, and the FB account connection will be saved.

Step 2: Creating an Automation Trigger for your Product(s)
Step 2: Creating an Automation Trigger for your Product(s)
After connecting your account, you must set up a Trigger to tell PayKickstart when to send customer information to Facebook.
In the PayKickstart dashboard, go to Configure and select Triggers →
https://app.paykickstart.com/vendor/configure/triggers

Click the + New Trigger button to create a new rule.

Configure the Trigger settings as follows:
Status:
First, toggle the switch at the top to make the trigger ACTIVE.Trigger Name:
Give your trigger a descriptive name so you can easily identify it later
(e.g., "Product 1 - New Sale to Facebook").
Select Event(s):
Choose the event that will fire this trigger.
For adding new customers, New sale is the most common choice.
Please Note:
Available event options will show clearly only after saving your first trigger.
We recommend choosing the New Sale event when setting up the integration for the first time as it would trigger with any new transaction that is created for the product.
For Facebook, the currently available and supported events are:
New Sale - triggers when a new transaction is created for the product
New Trial - triggers when a new trial is started for the product
Refund - triggers when a refund is issued to the customer, for the specific product
Subscription Cancellation - triggers when a Subscription is cancelled, for the product
Pending Cancellation - triggers when choosing to cancel the subscription at the end of the billing period, instead of immediately
Cart Abandonment - triggers 15 minutes after the checkout page has been abandoned
Subscription Changed - triggers whenever the subscription’s plan has been changed to a different one
IF Condition (The Rule):
This defines the variable that must be included for the trigger to run.
Important: The IF condition must be set to a Product, for the integration to function.

Best Practice Use Case:
We recommend creating a separate trigger for each product.
This makes it easier to manage and troubleshoot specific product integrations if needed, rather than having 1 trigger where all products are selected.
THEN Action (The Result):
This defines what will happen when the IF condition is met.

Set the THEN action to: Pass Details to Facebook Conversion Tracking
Service: Select Facebook from the dropdown.
Advertising Accounts: Choose the Facebook account you connected in your Integrations section.
Access Token: The Conversion API token from your FB Ad account. To find the Access Token, go to the Facebook Ad account event manager.

Locate the specific ad account, go to settings, and either create a new one or copy an existing access token.

Event: The event you want to test. Then go back to the events manager.
Locate the “test Events” section in FB.
Copy the test code, then paste it in the PK and click SEND TEST EVENT.
After sending the test, you will see the test event in your FB account.

Once you have configured the rule, click the Update Trigger button to save your automation.
ADDITIONAL NOTES:
Conversion pixels are ONLY triggered on up-front purchases.
This will NOT trigger an event for subscription rebills.
For deduplication in your conversion pixel, please use the PayKickstart Transaction ID as the event ID (where applicable).