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 3. 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
ℹ️ This code won't be needed in your Swaarm setup, but Meta requires it to complete the pixel installation.
On the Automatic advanced matching screen, no action is needed - click Done
1c - Adding custom conversions/events to Meta
1. Go to Facebook Ads Manager
Open Events Manager from the left hand side menu
Select Custom Converisons on the left hand menu
Select Create Custom Conversion
Add the Name, Description of the Custom conversion
Select the Dataset created in the previous step
Keep the Action Source to Website and Event to All url traffic
Under Rules, select Event Parameters contains and the event name (recommendation: use all small characters with _). Map the event in Swaarm - see step 3 (point 2).
Click create
Step 2 - Connect your Meta Ads account to Swaarm
Follow the steps in the popup to integrate your Meta account with Swaarm
Step 3 - Finish your integration and Map your events (SAN Event Mapping) in Swaarm
Once the integration is complete, go to Store App page → Edit → Integration → SAN Attribution → Meta, and add
Both generated during Step 1.
2. Then 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.
ℹ️ Use Meta’s standard events. Every Meta dataset already includes the standard events, such as Lead, Purchase, CompleteRegistration and Subscribe, so there’s nothing to set up in Meta. Only standard events are guaranteed to work for campaign optimization.
To map your events:
Go to the Store App page → Edit → Integrations → SAN Attribution → SAN Event Mapping → Meta
Next to each app event, enter the Meta event name. Names are case-sensitive, e.g.
Lead, notlead. Click Save.
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
⚠️ Custom events. Any name that isn’t a standard event is sent as a custom event. Custom events need to be created in Meta manually first (see step 1c). Meta may use them, but they’re not guaranteed to work for optimization, so use a standard event whenever one fits. For the full list of event names, see Meta’s standard events reference.
❗ 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: To target a specific OS or device, go to Placements, click + Create a rule set, then add a rule: set the condition to Audience → Mobile operating system, and select Android or iOS depending on your campaign. Save the rule set before continuing.
❗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










