Facebook Serverside API
UA | US | RU |
---|
Description
On the Leeloo.ai platform, you can connect your Facebook Business Manager pixel and send "conversion" events to Facebook from Leeloo.ai after a subscriber completes actions within the sales funnel.
Important: If you use a "direct link," event transmission will not work! Please keep this in mind.
Send "conversion" events after a subscriber:
Signs up for the sales funnel,
Leaves their phone number,
Makes an intermediate or key purchase.
This allows Facebook to optimize for users who are more likely to complete the desired target actions.
The integration works similarly to Google Analytics, but with some differences.
Connecting Analytics in Leeloo.AI
Go to Leeloo.ai → Settings → Analytics → Facebook.
To set up the integration, you need to provide the following details:
Name – Enter a name to identify the pixel.
Pixel ID – Enter your Facebook Pixel ID (you can copy it if it has already been created in Step 14).
Access Token – Enter the access token for integration (you can copy it if it has already been created in Step 16).
How to Create a Facebook Pixel
Go to your Facebook Business Manager using this link and select your business page or create it.
A data source can only be created from the Business Portfolio in Meta Business Manager. Make sure you have a Business Manager account set up before proceeding with creating a Facebook Pixel or other tracking tools.
Go to Data Source Settings and pree “+Add” button.
Enter the name of Data Source
Click the "Assign People" button and grant full permissions to yourself or your employee.
Click on "Connect Assets", and a new tab will open.
Add or Create Ad Account, then select and add an Ad Account.
Go to “ Events Manager“
Select the created Data Source, go to "Settings", and copy the Dataset ID.
Scroll down to the "API Conversions" section and click "Generate Access Token".
Click on the generated token to copy it to the clipboard, then paste it into the appropriate field in your Leeloo.ai account.
Return to the Leeloo.AI platform and paste the copied values into the fields.
How to Create a Test Event in Facebook Event Manager
You need to create an event that will be sent to Facebook. To do this, select the previously created Pixel in the Facebook integration settings.
Click the "+ Add Event" button.
Enter "Platform Name" – the name you will use on the platform. For example: subsapi.
Enter the "Test Code". You can find the test code in your Data Source.
Select "Events Type Parameters" – the name of the standard Facebook events you can specify.
If you want to create your own event, select "Custom".
For Custom Events:
In the "Name" field, enter how the event name will be transmitted to Facebook. For example: subsapi - Leeloo.AI .
Specify "action_source" – set it to "website".
Click "OK" and "Close".
How to Send Events?
Recommendation: First, determine the key metrics you want to track.
Events:
Subscription
Request for an Intermediate Sale
Intermediate Sale
Request for a Key Sale
Key Sale
Event Placement Guide
For each action, create an event and place it as follows:
Subscription – in LGT.
Request for an Intermediate Sale – in LGT or Funnel (depends on implementation logic).
Intermediate Sale – in Offer.
Request for a Key Sale – in LGT or Funnel (depends on implementation logic).
Key Sale – in Offer.
After creating the events you want to send from http://Leeloo.AI , you need to add them to the points through which you plan to transmit them to Facebook.
You can add parameters in:
LGT
Offers
Sales Funnel, and transmit them after an event occurs in the sales funnel.
How to Add Parameters in LGT?
Open your LGT and go to the "Traffic" tab.
Click the "Add Event" button.
In the "Action Type" field, select "Subscription".
In the "FB&Google Analytics" field, select the previously created Facebook analytics, e.g., "Facebook - Leeloo".
In the "Event" field, select the created event, e.g., "Subsapi".
Click "Save".
How to Add an Event to Offers?
Go to Sales Tunnels → Offers and select the category of the desired offer.
Open the specific offer where you want to add analytics
Open the "FB & Google Analytics" section.
Click "+ Add Event".
Select the "Action Type" you want to transmit.
Choose the "Analytics" previously connected from Facebook.
Select the event you pre-configured for this offer.
Click "Save".
How to Add an Event to the Sales Tunnel?
Go to Sales Tunnels → Select the desired Tunnel.
Right-click (Windows) or tap with two fingers (MacOS) on an empty space next to the LGT from which you want to transmit analytics, then select "Action".
Select the created block.
Go to "FB & Google Analytics".In the "Analytics" field, select the previously created Facebook analytics.
In the "Event" field, select the previously created event.
Click "Save".
Connect the "Action" block to the relevant LGT\Or any blocks.