@inphinit/react-native-attribution-plugin
v1.0.0
Published
React native plugin providing access to Apple Search Ads Attribution Token (iOS) and Google Play Install Referrer URL (Android).
Maintainers
Readme
@inphinit/react-native-attribution-plugin
A lightweight React Native plugin for accessing native mobile attribution data
- Apple Search Ads Attribution Token (iOS 14.3+)
- Google Play Install Referrer URL (Android)
- React Native Turbo Module plugin
- Dual licensing (GPL-3.0-only + Commercial)
No AppsFlyer, Adjust, Branch or other third-party attribution SDKs required
Installation
npm i @inphinit/react-native-attribution-pluginUsage:
import {ReactNativeAttribution} from "@inphinit/react-native-attribution-plugin";
import {Platform} from 'react-native';
const platform = Platform.OS;
if (platform === 'ios') {
const { attributionToken } =
await ReactNativeAttribution.getIosAttributionToken();
} else if (platform === 'android') {
const { referrerUrl } =
await ReactNativeAttribution.getAndroidReferrerUrl();
}iOS Requirements
- Apple Search Ads Attribution Token requires iOS 14.3+
- Attribution data is available only for installs originating from Apple Search Ads
- Send the returned attribution token to your backend server to retrieve attribution data using the Apple AdServices API
- Official Apple Docs for Attribution Token: https://developer.apple.com/documentation/adservices/aaattribution/attributiontoken()
Android Requirements
- Google Play Install Referrer provides attribution data only for installs originating from Google Ads
- Official Android Docs for Install Referrer API: https://developer.android.com/reference/com/android/installreferrer/api/package-summary
Returned values
iOS method getIosAttributionToken()
{ attributionToken: string }Android method getAndroidReferrerUrl()
{ referrerUrl: string }License
This project is dual-licensed:
- GPL-3.0-only for open-source projects
- Commercial license for proprietary applications
More information: https://inphinit.space/react-native-attribution-plugin
Contact: [email protected]
