- React Native 0.82+ (New Architecture), iOS 15.1+, Android 7.0 (API 24)+
- A thin wrapper around the Swift and Android SDKs, so it behaves the same way on both platforms
- Uses only your Program ID, never your API key
Before you start
In Partnero, open Program settings and turn on Enable mobile app claims in the Tracking for mobile apps section. Until then, every claim fails withcode_not_found.
Copy your Program ID from the program’s Integration page. It’s the same ID as in your PartneroJS snippet.
Install
Configure
Callconfigure once at launch, before any claim:
?aff= by default. If yours use another parameter, such as ?ref=DANIEL20, pass referralParameter: 'ref'.
Claim a code the user enters
Claim the code when the user enters one. Pass the ID your purchases are reported under, such as the RevenueCat app user ID:Purchases.logIn(...), since anonymous IDs are rejected.
If a code is used as both a partner’s link key and a promotion code, say which one the user entered:
Claim from an opened link
When a partner app link or a referral link opens your app, pass the URL on.Linking covers both the link that started the app and links that arrive while it’s open:
partnero_code, or from your referral parameter, such as https://example.com/?aff=DANIEL20. The click ID is read from partnero_click. It resolves to null without calling Partnero for links with neither.
If the user isn’t signed in yet, store the values and claim after sign-in:
Partnero.claimClick({ clickId, appUserId }).
Claim a Google Play install
When the program has no deep link and a Google Play link is set, app links send Android users to Google Play with the code and click ID in the install referrer. Claim it once the user is signed in:null when the install didn’t come from a partner link, and always on iOS, so you can call it on both platforms. Each install’s referrer is claimed once. If Google Play can’t be reached, or the claim fails because of a rate limit, a server error or the network, the next call tries again. Other refusals, such as an unknown code, are final for that install, so turn on mobile app claims before you release.
Claim results and failures
The claim functions resolve to an object with astatus:
Refusals reject with a
PartneroError, whose code is one of:
The library never retries on its own.
