Skip to main content

Running App Campaigns on Facebook (Meta) with Swaarm MMP

How to set up a Facebook Ads campaign using Swaarm tracking - create a dataset, generate an access token, configure the Meta pixel, and build the campaign.

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

  1. Go to Facebook Ads Manager and open Events Manager from the left-hand menu

  2. Click + Connect Data in the top left of the Events Manager overview page

  3. From the Connect a new data source menu, select Web

  4. On the Connect your Data screen, select Create New Dataset

  5. 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

  6. Wait for the process to finish and the next screen to load - do not refresh the page

  7. On the Choose your setup screen:

    • Click See other ways to set up

    • Select Set up manually

  8. On the How do you want to connect your website screen, select Conversions API and Meta Pixel

  9. On the next screen, click Finish

  10. Go back to the Datasets menu on the left - you should see your newly created dataset

  11. Select the dataset and open the Settings tab

  12. Generate Access Token

    • Scroll down to the section of Conversions API, and under the Setup direct Integration subtopic, click on Generate access token

    • Select the correct dataset and 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.

  13. 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

  1. Go to the Overview tab of the dataset and click See instructions under the Set up Meta pixel section

  2. 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.

  3. 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

  1. In Swaarm, go to Marketplace → Partners

  2. Find Meta

    and click Connect with Meta

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

  1. Once the integration is complete, go to Store App page → Edit → Integration → SAN Attribution → Meta, and add

  • Pixel ID - numeric value (Data Set ID)

  • Pixel Access Token

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.

  1. Go to the Store App page → Edit → Integrations → SAN Attribution → SAN Event Mapping

  2. Select Meta on the left-hand side

  3. 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 (step 1c), 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

  1. Go to the store app page for your app in Swaarm

  2. Scroll down to the Offers section

  3. Select the Meta account you connected in Step 2 and click Create

  4. On the next screen, copy the link that appears - you will need this in Step 5


Step 5 - Create the ad campaign in Meta

  1. In Facebook Ads Manager, create a new campaign and select Leads as the campaign objective

  2. Configure your campaign settings (budget, A/B test, ad categories) as needed

  3. 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

  4. 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.

  5. At the Ad level → Destination:

    • Paste the link copied from Step 4 as the Website URL

    • Set Browser add-ons to None

  6. At the Ad level → Tracking:

    • Check the Website events checkbox

    • Select the dataset created in Step 1

  7. 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

Did this answer your question?