Custom Conversions

Send your own conversion events, like a finished onboarding or an advanced user, from your server to every ad network connected in Superwall's MMP, matched to the ad click each user's install came from.

Custom conversions let your server tell your ad networks about milestones only you can see, such as a user who finished onboarding, created their first project, or became an advanced user. Superwall sends each one to every ad network connected in Superwall as your MMP: Meta, TikTok, Google Ads, Pinterest, Reddit, Snapchat and ChatGPT Ads. Each event is matched to the ad click the user's install came from. If you optimize a campaign for the event, the network looks for more people like the users who reached it, not only the ones who bought.

You send one API call per user and event, and Superwall sends it to all your connected networks at once. These events go out alongside the purchase events Superwall already sends and never change them.

Requirements

  • At least one ad network connected in MMP: Meta Ads, TikTok Ads, Google Ads, Reddit Ads, Pinterest, Snapchat or ChatGPT Ads. The conversion goes to every one that's on and has its conversions credential.
  • An organization API key with the users:write scope and access to the project. Create one under Settings › API Keys. See API key access.
  • The app user ID you identify the user with in the SDK. Superwall uses it to find the user's device and ad click.

Send a conversion

Send a POST to /v2/projects/{project_id}/conversions from your server, with your API key as a bearer token:

curl https://api.superwall.com/v2/projects/$PROJECT_ID/conversions \
  --request POST \
  --header "Authorization: Bearer $SUPERWALL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "application_id": 123,
    "app_user_id": "user_8f2c1a",
    "event_name": "advanced_user",
    "event_id": "advanced_user-user_8f2c1a",
    "networks": {
      "snapchat": { "event_name": "CUSTOM_EVENT_1" },
      "google_ads": { "conversion_action_id": "6912345678" }
    }
  }'

Prop

Type

Unknown fields return 400. The full schema is in the API reference, under Conversions.

Event names per network

NetworkWhat it receives
Meta, TikTokevent_name as is.
RedditA Reddit standard event when event_name is exactly one, like SIGN_UP or LEAD. Anything else is sent as a custom event with your name.
ChatGPT AdsAn OpenAI standard event when event_name is one. Anything else is sent as a custom event with your name.
PinterestA Pinterest event when event_name is one, like signup or lead. Anything else is sent as custom. Set networks.pinterest.event_name to choose another Pinterest event.
SnapchatOnly Snapchat's own events, such as SIGN_UP, PURCHASE or CUSTOM_EVENT_1 to CUSTOM_EVENT_5. Set networks.snapchat.event_name unless event_name already is one. Your event_name is sent as the event's tag.
Google AdsA conversion action, not a name. Set networks.google_ads.conversion_action_id to the ID of an Import from clicks conversion action in the connected account.

A network that can't take the event returns skipped with reason needs_mapping, and the other networks are still sent.

Read the result

The call waits for every network and returns 200 with one result per connected network:

{
  "object": "conversion",
  "event_id": "advanced_user-user_8f2c1a",
  "event_name": "advanced_user",
  "results": [
    { "network": "meta", "status": "sent", "reason": null, "message": null, "retryable": false, "matched_click": false },
    { "network": "tiktok", "status": "sent", "reason": null, "message": null, "retryable": false, "matched_click": true },
    { "network": "snapchat", "status": "skipped", "reason": "needs_mapping", "message": "…", "retryable": false, "matched_click": false }
  ]
}

status is sent, skipped or failed. matched_click says whether the user's install was matched to one of that network's ad clicks. Networks you haven't connected aren't listed, unless you named them in networks. A skipped or failed result has a reason:

StatusReasonMeaning
skippednot_configuredYou named the network in networks, but it isn't connected for this app.
skippedneeds_mappingThe network can't take event_name as is. Set its networks option. See Event names per network.
skippedno_match_signalsNothing for the network to match the user on. For example, there's no ad click and no app session in the last 30 days, or Google Ads has no Google click ID.
skippedtracking_refusedThe user refused tracking on iOS, and the app doesn't send events for those users to this network. See Consent and tracking.
skippedconsent_deniedThe user's ad consent rules the event out, and there's no ad click to send it with.
failedrejectedThe network refused the event. message has its reason.
failedcredentials_rejectedThe network refused the stored credential. Reconnect it in that network's integration.
failedunavailableThe network, or Superwall's lookup of the user's ad click, couldn't be reached.

Retries

Resend a conversion only when one of its results has retryable: true. That means nothing reached that network, for example because it throttled the request. Send it with the same event_id, and set the networks that already got it to false in networks.

Don't resend anything else. Ad networks don't promise to drop an event_id they've already received, so resending a sent conversion, or a failure without retryable, can count it twice. A failed result with retryable: false and reason unavailable means the network may have received the event.

Each app can send 100 conversions a minute. Over that, the request returns 429 with a Retry-After header.

How matching works

  • The ad click comes from the user's device. Superwall finds the device the user last used your app on, and the install on that device that was matched to an ad. Each network gets that click's IDs (like fbc, ttclid or gclid) when the click came from one of its ads, so it attributes the conversion to the same ad as the user's purchases.
  • Users without a matched click are still sent where the network can match them another way: the IP address and user agent of the user's latest app session in the last 30 days. Use matched_click to see how many conversions came from each network's ads.
  • The user is identified by a hash. Networks receive the SHA-256 hash of the app user ID as their external ID, the same as for Superwall's purchase events. User attributes such as email or phone number aren't sent with custom conversions.
  • Every network gets the same dedup ID, derived from your app and event_id.
  • Custom names may need confirming. A network treats a new custom event name like any other. On Meta, confirm it in Events Manager before choosing it in Ads Manager.

Superwall reads the user's ad consent and App Tracking Transparency status from the SDK. See Ad consent for how to report it. Each network follows the same rules as for Superwall's purchase events:

  • A user who refused tracking on iOS isn't sent (tracking_refused) unless Send events for users who refused tracking is on for that network. With it on, the event is cut down as below. Google Ads has no such setting, and never gets these users.
  • A user who denied ad user data, or one who refused tracking when the setting is on, is sent with only the ad click ID and the fewest other signals the network needs, marked as opted out where the network supports it. Without an ad click, nothing is sent, and the result is consent_denied. Google Ads receives the event marked with the user's consent instead.
  • A user who denied ad personalization is sent in full, marked so the network doesn't use it for personalized ads.

Limitations

  • occurred_at can be at most 7 days ago.
  • One conversion per request.
  • Hashed email, phone and device IDs aren't sent, so a network that needs them to match a user without an ad click may skip the user.

How is this guide?

On this page