This guide walks you through connecting Facebook Ads with Swaarm - from creating a dataset in Facebook Events Manager to publishing a campaign with Swaarm tracking link.
Step 1 - Create a dataset in Facebook Events Manager
1a - Create the dataset
Go to Facebook Ads Manager and open Events Manager from the left-hand menu
Click + Connect Data in the top left of the Events Manager overview page
From the Connect a new data source menu, select Web
On the Connect your Data screen, select Create New Dataset
Name the dataset - for example, you may use the format Swaarm [Your Company Name] (e.g.
Swaarm TestCompany)Uncheck Request a free Conversions API Gateway demo if prompted
Wait for the process to finish and the next screen to load - do not refresh the page
On the Choose your setup screen:
On the How do you want to connect your website screen, select Conversions API and Meta Pixel
On the next screen, click Finish
Go back to the Datasets menu on the left - you should see your newly created dataset
Select the dataset and open the Settings tab
Generate Access Token
Scroll down to the section of Conversions API, and under the Setup direct Integration subtopic, click on Generate access token
⚠️ Once a dataset is connected to the Quality API, the integration cannot be removed or reversed. Make sure you select the correct dataset before generating the token.
When the token is generated, copy and save it immediately - you will need both the access token and the Dataset ID in Step 2. The Dataset ID can be found directly below the dataset name in the Datasets menu.
1b - Set up the Meta Pixel
Go to the Overview tab of the dataset and click See instructions under the Set up Meta pixel section
On the Install Meta Pixel screen, click Copy code then Continue
On the Automatic advanced matching screen, no action is needed - click Done
Step 2 - Connect your Meta Ads account to Swaarm
In Swaarm, go to Marketplace → Partners
Find Meta
and click Connect with Meta
Follow the steps in the popup to integrate your Meta account with Swaarm
Once the integration is complete, go back to Partners and find your Meta/Facebook Ads account
Click Edit on the partner page
Under the Integrations tab, add:
Step 3 - Map your events (SAN Event Mapping) in Swaarm
Map your app's events to the corresponding Meta standard events. This tells Meta which event each Swaarm event should be reported as, so campaigns can optimize toward the right actions.
Go to the Store App page → Edit → Integrations → SAN Attribution → SAN Event Mapping
Select Meta on the left-hand side
For each event, map:
Left side - the event as defined in your app / Swaarm (e.g. Install, Open, Reinstall)
Right side - the corresponding Meta standard event (e.g.
Lead,CompleteRegistration,Purchase), matching the event set up in your Meta dataset in Step 1
4. Click Save
ℹ️ Map to Meta's standard events where possible. Meta provides a predefined set of standard events (e.g. Complete Registration, Purchase, Lead, Subscribe). Using standard events is recommended - Meta's optimization is trained on these specific event names, so they perform better than custom event names.
The campaign setup in this guide optimises for the Lead event (see Step 5). To map additional events, make sure the matching standard event is set up in your Meta dataset first, then add it here. See Meta's standard and custom events guide for the full list, or the Conversions API for App Events reference for the app-specific technical details.
❗ Map the events before creating the campaign. If an event isn't mapped, its conversions won't be reported to the Meta standard event, and optimization for that event won't work. Events left blank are not forwarded to Meta.
Step 4 - Create a SAN Campaign in Swaarm
Step 5 - Create the ad campaign in Meta
In Facebook Ads Manager, create a new campaign and select Leads as the campaign objective
Configure your campaign settings (budget, A/B test, ad categories) as needed
At the Ad set level:
Set Conversion location to Website
Set Dataset to the dataset you created in Step 1 (e.g.
Swaarm TestCompany)Set Conversion event to Lead
Configure remaining ad set settings (budget, schedule, audience) as needed
ℹ️ Placement settings - device and OS targeting: Make sure to set the correct device and OS targeting for your campaign under Placement settings. Use Android for Android app campaigns and iOS for iOS app campaigns. Mixing platforms in a single campaign can result in traffic being sent to the wrong store or tracking mismatches.
At the Ad level → Destination:
Paste the link copied from Step 4 as the Website URL
Set Browser add-ons to None
At the Ad level → Tracking:
Check the Website events checkbox
Select the dataset created in Step 1
Configure any remaining ad settings and click Publish
What happens next?
Once Swaarm starts receiving data from Meta:
An offer is created automatically in Swaarm for each Meta campaign
All stats - installs, events, and cost - are recorded under the respective offer






