npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

deeplink-rn

v0.2.5

Published

Zero-code install attribution SDK for React Native (Android)

Readme

deeplink-rn – Install Attribution & Deep Links (Android)

deeplink-rn is a zero-code install attribution and deep-link tracking SDK for React Native (Android).

It:

  • Tracks Play Store installs and basic device/app info.
  • Sends an initial "app open" event (optionally with FCM token).
  • Sends every deep link your Android app receives to your backend.

1. Installation

Install the package in your React Native app:

npm install deeplink-rn
# or
yarn add deeplink-rn

If you are developing locally and the SDK lives next to your app:

npm install ../deeplink-rn
# or
yarn add ../deeplink-rn

Then rebuild your native app so the native module is linked:

# iOS (no-op for this SDK but required after adding any native module)
cd ios && pod install && cd ..
npx react-native run-ios

# Android (required)
npx react-native run-android

Note: The native Android module is called InstallAttribution. If the app is not rebuilt, JS will throw: deeplink-react-native: Native module not found. Did you rebuild the app after installing the package?


2. Basic usage (passing your API key)

Call configure once at app startup, after the root component is mounted / app has an Activity:

// index.js or App.tsx
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

// Option 1: default export
import InstallAttribution from 'deeplink-rn';

InstallAttribution.configure({
  apiKey: 'YOUR_API_KEY_HERE',           // required – string
  // endpoint: 'https://your-api.example.com', // optional override
});

AppRegistry.registerComponent(appName, () => App);

You can also use the named export:

import {configure as configureInstallAttribution} from 'deeplink-rn';

configureInstallAttribution({
  apiKey: 'YOUR_API_KEY_HERE',
});

configure parameters

  • apiKey (string, required)
    Used as the X-API-Key header for all tracking calls. If missing or blank, JS / native will throw or reject.

  • endpoint (string, optional)
    Optional override for the base URL. If omitted, the SDK uses its built‑in endpoints.

Internally, configure calls the native InstallAttribution.init(context, apiKey, intent) which:

  • Tracks install referrer (Play Store vs sideload).
  • Sends an initial connection event with device/app metadata (and optional FCM token).
  • Processes the launch deep link (if any) from the current Activity intent.

3. Android deep-link configuration

To send deep links to the SDK, your main Activity must declare a view intent filter.
For example, in your app AndroidManifest.xml:

<activity
  android:name=".MainActivity"
  android:launchMode="singleTask"
  android:exported="true">

  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>

  <!-- Deep link: https://link.invyto.in/ -->
  <intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
      android:scheme="https"
      android:host="link.invyto.in"
      android:pathPrefix="/" />
  </intent-filter>
</activity>

When such a link opens your app, the SDK reads intent.data and sends it to the backend with your apiKey.

Tip: Adjust android:host and android:pathPrefix to match your own link domain and path.


4. When configure should be called

  • Call configure after the React Native app has an attached Activity.
    If called too early, the native side may reject with NO_ACTIVITY.
  • Typically, putting it in index.js or at the top of your root component is sufficient.

The SDK caches the last used apiKey so it can handle subsequent deep links while the app is running.


5. Troubleshooting

  • Native module not found
    Rebuild the app after installing the package:

    • cd android && ./gradlew clean && cd ..
    • npx react-native run-android
  • NO_ACTIVITY error
    Ensure you call configure after the app has started (e.g., not from extremely early bootstrap code).

  • No deep links received
    Check that:

    • Your AndroidManifest.xml has the correct <intent-filter> for your domain.
    • You are opening a URL that matches the scheme/host/pathPrefix.