The `react-native-converted-in-sdk` package provides a React Native bridge for integrating the ConvertedIn tracking and analytics SDKs into both iOS and Android applications. It simplifies the process of incorporating e-commerce event tracking, such as 'view content', 'add to cart', 'initiate checkout', and 'purchase', as well as user identification features. The current stable version is 1.1.0, with a recent history of rapid releases (September 2024) addressing bug fixes and minor feature enhancements, indicating active development. A key differentiator is its dual API approach, offering both a functional `initializeSDK` method and a `RNConvertInSDKProvider` component with a `useConvertedInSdk` hook for flexible integration patterns. The library ships with TypeScript type definitions, improving developer experience. ConvertedIn itself is a marketing operating system for e-commerce, focusing on personalized multi-channel marketing to boost customer engagement and ROI.
npm install react-native-converted-in-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the ConvertedIn SDK using the `RNConvertInSDKProvider` and how to use the `useConvertedInSdk` hook to identify users and track e-commerce events like 'Purchase' within a React Native component. It showcases both provider-based setup and direct method calls.
Upgrade to `react-native-converted-in-sdk@1.0.1` or later: `npm install react-native-converted-in-sdk@latest` or `yarn add react-native-converted-in-sdk@latest`.
Upgrade to `react-native-converted-in-sdk@1.0.2` or later: `npm install react-native-converted-in-sdk@latest` or `yarn add react-native-converted-in-sdk@latest`.
For iOS: Add `pod 'react-native-converted-in-sdk', :path => '../node_modules/react-native-converted-in-sdk'` to your `Podfile` and run `pod install`. For Android: Add `include ':react-native-converted-in-sdk'` and `project(':react-native-converted-in-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-converted-in-sdk/android')` to `settings.gradle`, and `implementation project(':react-native-converted-in-sdk')` to `app/build.gradle`. Then run `./gradlew sync`.Upgrade to `react-native-converted-in-sdk@1.0.2` or later to benefit from included TypeScript definitions: `npm install react-native-converted-in-sdk@latest` or `yarn add react-native-converted-in-sdk@latest`.
Always ensure the SDK is initialized at the root of your application, or verify initialization status before calling any tracking or identification methods.
Given past issues, ensure you are on `v1.0.2` or newer, and all native linking steps for both iOS (Podfile) and Android (Gradle) are correctly applied, and run `pod install` (iOS) and `./gradlew sync` (Android).
Verify that `pod install` was run in your `ios/` directory, and that the `react-native-converted-in-sdk` entry is correctly present in your `Podfile`. Clean your Xcode build folder and rebuild.
Ensure your `android/settings.gradle` and `android/app/build.gradle` files contain the correct `include` and `implementation` lines as per the installation instructions, and sync your Gradle project (`./gradlew sync`). Also ensure you have `mavenCentral()` or `google()` repositories configured in your `build.gradle` files.
Upgrade to `react-native-converted-in-sdk@1.0.2` or later to get proper type definitions. If already on a recent version, ensure your `tsconfig.json` is correctly configured and your `node_modules` are clean (`rm -rf node_modules && yarn install`).