Skip to content

dubinc/dub-react-native

Dub.co React Native SDK to track deep links and attribution.

Dub React Native SDK (BETA)

Track deep link conversion events in your React Native app
Learn more »

Installation · Development Contributing License


Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs.

The Dub React Native SDK is a client side library built in Typescript for React Native.

It enables open tracking for regular/deferred deep links as well as tracking lead and sale conversion events.

Learn more about the Dub React Native SDK in the official documentation.


Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs. The Dub React Native SDK is a client side library built in React Native using Typescript. It enables open tracking for deep links and deferred deep links as well as conversion tracking for sale and lead events. Learn more about the Dub React Native SDK in the official documentation.

Handle deep links and track conversions from your React Native app.

Installation

npm install @dub/react-native

Usage

Initialize the Dub SDK

Option 1: Use the DubProvider to wrap your app

import { DubProvider } from '@dub/react-native';

export default function App() {
return (
    <DubProvider publishableKey="<DUB_PUBLISHABLE_KEY>" dubDomain="<DUB_DOMAIN>">
      // Your app content...
    </DubProvider>
  )
}

Option 2: Manually initialize the Dub SDK

import dub from '@dub/react-native';

export default function App() {
  useEffect(() => {
    dub.init({
      publishableKey: '<DUB_PUBLISHABLE_KEY>',
      domain: '<DUB_DOMAIN>',
    });
  }, []);

  // Return your app...
}

Development

Run pnpm install from the project root to install package dependencies. Then, start the dev server by running pnpm dev from the project root. The React Native dev server allows for hot reload.

Contributing

License

MIT

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •