
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@rudderstack/rudder-sdk-react-native
Advanced tools
RudderStack is a customer data pipeline tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.
More information on RudderStack can be found here.
The RudderStack React Native SDK allows you to track event data from your app. It can be easily integrated into your React Native application. After integrating this SDK, you will also send the event data to your preferred analytics destination/s, such as Google Analytics, Amplitude, and more.
yarn add @rudderstack/rudder-sdk-react-native
mavenCentral() as a repository in your project level build.gradle file, as shown below:buildscript {
    repositories {
        mavenCentral()
    }
}
allprojects {
    repositories {
        mavenCentral()
    }
}
ios folder of your application and install all the dependencies with:pod install
RudderClientAdd the below line to import the rudderClient.
import rudderClient, { RUDDER_LOG_LEVEL } from '@rudderstack/rudder-sdk-react-native';
RudderClientAdd the following code in your application:
const config = {
  dataPlaneUrl: <DATA_PLANE_URL>,
  trackAppLifecycleEvents: true,
  logLevel: RUDDER_LOG_LEVEL.DEBUG
};
await rudderClient.setup(<WRITE_KEY>, config);
rudderClient.track("simple_track_event", {
  "key1":"val1",
  "key2":{
    "child_key1":"child_val1"
  }
});
You can use the putDeviceToken method to pass your Android and iOS device tokens.
putDeviceToken accepts two string arguments :
androidToken : Your Android device tokeniOSToken : Your iOS device tokenAn example usage is as shown below:
rudderClient.putDeviceToken("<Your Android device token>", "<Your iOS device token>");
You can use the setAdvertisingId method to pass your Android and iOS AAID and IDFA respectively.
setAdvertisingId accepts two string arguments :
androidId : Your Android advertisingId (AAID)iOSId : Your iOS advertisingId (IDFA)Example Usage:
rudderClient.setAdvertisingId(AAID, IDFA);
You can use the setAnonymousId method to pass your anonymousId and the SDK will use that instead of the deviceId.
setAnonymousId accepts one string argument:
id : Your anonymousIdExample Usage:
rudderClient.setAnonymousId(ANONYMOUS_ID);
For more details, check out our documentation.
If you come across any issues while configuring or using RudderStack React Native SDK, please feel free to start a conversation on our Slack channel. We will be happy to help you.
FAQs
Rudder React Native SDK
The npm package @rudderstack/rudder-sdk-react-native receives a total of 8,272 weekly downloads. As such, @rudderstack/rudder-sdk-react-native popularity was classified as popular.
We found that @rudderstack/rudder-sdk-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.