How to set up Meta (Facebook) Conversion API (CAPI) and App Events for Mobstep — complete guide

By admin , 13 December 2025
How to set up Meta (Facebook) Conversion API (CAPI) and App Events for Mobstep — a clear step-by-step guide

Goal: Configure both server-side (CAPI) and client-side (App Events / JS SDK) Facebook integrations from scratch, including app creation, adding your Mobstep app package, linking hash keys, mapping events, testing, and deduplication.


Why use both?

  • Conversions API (CAPI): Server-side events improve attribution, recover signals blocked by ad-blockers, and are resilient to browser privacy limitations.

  • App Events / JS SDK: Client-side events give real-time UI tracking for PageView, ViewContent, AddToCart, Purchase, etc.

  • Best practice: Enable both + use deduplication (event_id) so Meta doesn’t double-count events.


Prerequisites

  • Meta Business Manager access.

  • Access to Meta Events Manager for the Pixel.

  • Mobstep account with Application Builder access.

  • For App Events: a Meta App in developers.facebook.com.


Part A — Facebook App Creation and Setup (for App Events)

1) Create a new Facebook App

  1. Go to developers.facebook.comMy Apps → Create App.

  2. Choose Business app type → click Next.

  3. Fill in:

    • App Name (e.g., Mobstep “MyApp”)

    • Contact Email

    • Business Account → select your Meta Business Manager account.

  4. Click Create App.

Reference: Meta App Creation Guide

2) Add your Mobstep app to Facebook App

  1. Open Application Builder in Mobstep → select your app → Keys tab:

    • Copy your Package Name.

    • Copy the Debug Key Hash and Release Key Hash (two keys).

  2. In your Facebook App → Settings → Basic → Add Android App.

    • Paste Package Name from Mobstep.

    • Paste Debug and Release Key Hashes.

  3. Save changes.

Why keys matter: Facebook SDK verifies your app’s signature when sending App Events from the client. Without matching hash keys, events may be rejected.


3) Copy your App ID and Client Token

  1. In Settings → Basic, copy App ID.

  2. Optional: copy Client Token for SDK validations (improves security).


4) Add products for App Events tracking

  1. In your Facebook App → App Dashboard → Add Product → App Events.

  2. Enable App Events → configure tracking.

  3. These events will now correspond to Mobstep events (mapped via JSON later).

Reference: Meta App Events Guide


Part B — Facebook Pixel & Conversion API Setup

1) Create / select Pixel

  1. Go to Events Manager → Data Sources → Pixels → Add or select an existing Pixel.

  2. Copy Pixel ID for Mobstep configuration.

2) Generate Conversion API Access Token

  1. In Pixel → Settings → Conversions API → Generate Access Token.

  2. Copy token — you’ll paste it into Mobstep.

3) (Optional) Get Test Event Code

  1. Pixel → Test Events → copy Test Event Code for temporary testing.


Part C — Mobstep Plugin Setup

1) Facebook Conversion API (server-side)

  1. Go to your app → Plugins → Facebook Conversion API.

  2. Toggle Enable Facebook Conversion API.

  3. Paste Pixel ID and Access Token.

  4. Optional: paste Test Event Code.

  5. Keep Send Events ON.

  6. Add Event Mapping JSON (example below).

  7. Toggle Deduplication Enabled if you’re also sending App Events.

  8. Save.


2) Facebook App Events (client-side JS SDK)

  1. Go to Plugins → Facebook App Events.

  2. Toggle Enable Facebook App Events.

  3. Paste App ID and optional Client Token.

  4. Keep Tracking Enabled ON.

  5. Add Event Mapping JSON (can mirror CAPI mapping).

  6. Save.


Part D — Testing

1) Test Events in Events Manager

  • Paste Test Event Code (CAPI).

  • Trigger flows: view product, add to cart, purchase.

  • Verify Browser (App Events) and Server (CAPI) streams.

2) Verify deduplication

  • Confirm event_id matches across browser + server events.

3) Use Meta Payload Helper for CAPI payload validation

  • Check currency, numeric fields, required identifiers.


Part E — Privacy & Compliance

  • Collect and honor user consent (GDPR / CCPA).

  • Don’t send raw PII unless hashed/allowed.


Troubleshooting

IssueFix
No eventsCheck plugin enabled, Pixel/App ID correct, Access Token valid.
DuplicatesEnable deduplication + use same event_id.
Server events missingEnsure Send Events ON, server can reach Meta.
App Events missingCheck Tracking Enabled, hash keys match Mobstep app.

Final Checklist

  • Meta: Pixel ID, CAPI Access Token, optional Test Event Code.

  • Facebook App: App ID, optional Client Token, hash keys added, package name correct.

  • Mobstep → Plugins → CAPI: Enabled, Event Mapping, Deduplication ON.

  • Mobstep → Plugins → App Events: Enabled, Tracking Enabled, Event Mapping.

  • Test in Events Manager → confirm Browser + Server events.

Blog Section