Skip to content

Repository files navigation

@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
  • ⚖️ MIT license

No AppsFlyer, Adjust, Branch or other third-party attribution SDKs required

Installation

npm i @inphinit/react-native-attribution-plugin

Usage:

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

Android Requirements

Returned values

iOS method getIosAttributionToken()

{ attributionToken: string }

Android method getAndroidReferrerUrl()

{ referrerUrl: string }

📄 License

This project is distributed under the terms of the MIT license

Need help integrating it?

I can integrate it into your application
📩 inphinit.dev@gmail.com

Releases

Packages

Contributors

Languages