Skip to main content

Running App Campaigns on X (Twitter) with Swaarm MMP

How to set up an X (Twitter) Ads campaign using Swaarm tracking - connect your X Ads account, create a pixel and conversion event in X Events Manager, and configure the integration.

This guide walks you through connecting X Ads with Swaarm - from creating a pixel in X Events Manager to configuring your X Partner in Swaarm.


Step 1 - Create a pixel and conversion event in X Ads Manager

Follow the steps below to create the pixel and conversion event in your X Ads Manager account.

  1. Go to X Ads Manager (ads.x.com)

  2. Open Events Manager from the left-hand menu

  3. Click Install Pixel in the top right of the Events Manager overview page

  4. Enter your website URL and continue

  5. Select Manual as the installation method and continue

  6. On the next screen, select Conversion API and continue

  7. Generate the Access Token

    Copy and save the Access Token immediately. Add it to the X integration field in Swaarm later in Step 4.

  8. Click Done


Step 2 - Connect your X Ads account to Swaarm

  1. In Swaarm, go to Marketplace → Partners

  2. Find X Ads and click Connect with X Ads

  3. Add Name and your X Ads account ID

  4. Once clicked on Create Partner, the X Ads Partner will be automatically created under your Partners tab and you will be redirected to the partner page


Step 3 - Create a conversion event in X Ads Manager

  1. Go to X Ads Manager → Events Manager

  2. Select +Add Event in the top right corner

  3. Add the Event Name and Event Type

    Event Type is a category of the event - one of X's predefined classifications (e.g. Lead, Purchase, Sign-up) rather than a free-text field. It tells X what kind of action the event represents; the Event Name is just your own label for it.

  4. Select Define with code as the setup method

  5. Set the attribution windows as needed

  6. Optionally, turn on the option to create a website activity audience from this event

  7. Click Create Event

  8. Once the event is created, open the Conversion API tab and copy the Pixel ID and Event ID - you'll need both in Step 4


Step 4 - Finish the integration and map your events in Swaarm

Part A - Add your pixel credentials

  1. Go to Store App page → Edit → Integrations → SAN Attribution → X Ads

  2. Add:

    • Pixel ID (from Step 3)

    • Conversion API Token - the access token generated in Step 1

    ℹ️ Both values come from X Ads Manager → Tools → Events Manager: open the pixel, then Install Pixel → Manual → Conversion API → Generate access token.

  3. Use Real Event to verify the setup: pick an event and click Send real event to fire a single conversion to your pixel, confirming the token and mapping work without waiting for live traffic.

  4. Click Save

ℹ️ X has no test mode - sending a Real Event counts as a real conversion in Events Manager.

Part B - Map your events

This tells X Ads which event each Swaarm event should be reported as, so campaigns can optimise toward the right actions.

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

  2. Select X Ads 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 X Ads event ID from Step 3 (a short code such as tw-rflzf-abcde)

      ⚠️ X Ads has no standard event names, so there's no default mapping. An event without a mapping - including Install - is not forwarded to X.

  3. Click Save


Step 5 - 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 and click Create SAN Offer

  3. Select the X Ads account you connected in Step 2

On the next screen, you'll find the URL and parameter table you'll need in Step 6 to create your ad campaign in X


Step 6 - Create the ad campaign in X Ads Manager

Now you are ready to create the campaign.

  1. In X Ads Manager, create a new campaign by clicking on +Campaign form and select Sales as the campaign objective

  2. Add the campaign name and continue to the Ad group

  3. At the Ad group level:

    • Name the ad group and set the budget

    • Configure targeting as needed - location, language, gender, age, OS, device model, carriers, etc.

    • Under Delivery & Placements, select the conversion event you created in Step 3 as the event to optimize on

    • Add advanced targeting if needed, then continue to the Ad level

  4. At the Ad level, under Website URL, paste the URL from Step 5

  5. Then, under Add URL tracking below the headline, add each of these as a parameter. The {{…}} values are X Ads Manager variables which can be picked from the dropdown in X. As for offer_id and pub_id, copy the value from the table below

6. Click Save

7. Add the remaining creative assets and details as needed, look at preview and then click Publish

Did this answer your question?