An open API service indexing awesome lists of open source software.

https://github.com/dubinc/dub-react-native


https://github.com/dubinc/dub-react-native

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          


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](http://dub.co/) 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](https://dub.co/docs/concepts/deep-links/deferred-deep-linking) as well as [tracking lead and sale conversion events](https://dub.co/docs/concepts/deep-links/attribution).

Learn more about the Dub React Native SDK in the [official documentation](https://dub.co/docs/sdks/client-side-mobile/installation-guides/react-native).


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](https://dub.co/docs/sdks/client-side-mobile/installation-guides/react-native).

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

## Installation

```sh
npm install @dub/react-native
```

## Usage

### Initialize the Dub SDK

Option 1: Use the `DubProvider` to wrap your app

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

export default function App() {
return (

// Your app content...

)
}
```

Option 2: Manually initialize the Dub SDK

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

export default function App() {
useEffect(() => {
dub.init({
publishableKey: '',
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

- [Development workflow](CONTRIBUTING.md#development-workflow)
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
- [Code of conduct](CODE_OF_CONDUCT.md)

## License

MIT