Skip to main content

Running App Campaigns on Facebook (Meta) with Swaarm

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

  3. On the Automatic advanced matching screen, no action is needed - click Done


Step 2 - Connect your Meta Ads account to Swaarm

  1. In Swaarm, go to Marketplace → Partners

  2. Find Meta

    and click Connect with Meta

  3. Follow the steps in the popup to integrate your Meta account with Swaarm

  4. Once the integration is complete, go back to Partners and find your Meta/Facebook Ads account

  5. Click Edit on the partner page

  6. Under the Integrations tab, add:

    • The Pixel ID from the dataset created in Step 1

    • The Access Token generated in Step 1


Step 3 - 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 4


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

  5. At the Ad level → Destination:

    • Paste the link copied from Step 3 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?