Integration with other SDK

Why a shared clientId matters

Magify generates a stable clientId for every user. Passing the same identifier to each third-party SDK (AppsFlyer, Adjust, AppLovin Max, LevelPlay, RevenueCat) ensures that attribution, analytics, and monetization data all refer to the same user, giving you consistent cross-platform reporting.

Initialization order

Always initialize the Magify SDK before reading magify.clientId and passing it to other SDKs:

  1. Configure and create the Magify instance.
  2. Call magify.initSdk and magify.initialSetup().
  3. Read magify.clientId.
  4. Pass the value into each third-party SDK during its own initialization.

Use clientId for all integrations

val clientId = magify.clientId

// AppsFlyer
AppsFlyerLib.getInstance().setCustomerUserId(clientId)

// Adjust
val adjustConfig = AdjustConfig(this, "{YourAppToken}", AdjustConfig.ENVIRONMENT_PRODUCTION)
Adjust.addGlobalCallbackParameter("client_id", clientId)
Adjust.addGlobalPartnerParameter("client_id", clientId)
Adjust.initSdk(adjustConfig)

// AppLovin MAX — set before initializing the AppLovin SDK
AppLovinSdk.getInstance(this).userIdentifier = clientId

// LevelPlay — pass the user ID in the init request
val levelPlayInit = LevelPlayInitRequest.Builder("{YourAppKey}")
    .withUserId(clientId)
    .build()
LevelPlay.init(this, levelPlayInit, levelPlayInitListener)

// RevenueCat
val purchasesConfig = PurchasesConfiguration.Builder(this, "{your_api_key}")
    .appUserID(clientId)
    .build()
Purchases.configure(purchasesConfig)

SDK-specific guides

  • AppsFlyer — set the Magify clientId as the AppsFlyer customer user ID.
  • Adjust — attach the Magify clientId as Adjust global callback and partner parameters.
  • AppLovin MAX — set the Magify clientId as the MAX user identifier.
  • LevelPlay / IronSource — pass the Magify clientId as the user ID in the LevelPlay init request.
  • RevenueCat — pass the Magify clientId as the RevenueCat app user ID.
  • Your own integration — pass your own trusted identifier into Magify as a custom clientId.

Related articles

Android

ExternalLinkProduct

LimitedTimeOfferBase

MagifyManager

Purchases

MagifyPresenter