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:
- Configure and create the Magify instance.
- Call
magify.initSdkandmagify.initialSetup(). - Read
magify.clientId. - 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
clientIdas the AppsFlyer customer user ID. - Adjust — attach the Magify
clientIdas Adjust global callback and partner parameters. - AppLovin MAX — set the Magify
clientIdas the MAX user identifier. - LevelPlay / IronSource — pass the Magify
clientIdas the user ID in the LevelPlay init request. - RevenueCat — pass the Magify
clientIdas the RevenueCat app user ID. - Your own integration — pass your own trusted identifier into Magify as a custom
clientId.