Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@segment/analytics-react-native-plugin-advertising-id
Advanced tools
The hassle-free way to add Segment analytics to your React-Native app.
EnrichmentPlugin
to collect advertisingId on Android
Add the package
yarn add react-native-analytics-react-native-plugin-advertising-id
This plugin requires a compileSdkVersion
of at least 31.
See Google Play Services documentation for advertisingId
setup
Follow the instructions for adding plugins on the main Analytics client:
In your code where you initialize the Analytics client call the .add(plugin)
method with an AdvertisingId
instance
import { createClient } from '@segment/analytics-react-native';
import { AdvertisingIdPlugin } from '@segment/analytics-react-native-plugin-adjust';
const segmentClient = createClient({
writeKey: 'SEGMENT_KEY'
});
//...
segmentClient.add({ plugin: new AdvertisingIdPlugin() });
You will also need to ensure you have added the Application_ID metadata
tag to your AndroidManifest.xml
<!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
<!-- <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"/> -->
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
The hassle-free way to add Segment analytics to your React-Native app.
The npm package @segment/analytics-react-native-plugin-advertising-id receives a total of 3,274 weekly downloads. As such, @segment/analytics-react-native-plugin-advertising-id popularity was classified as popular.
We found that @segment/analytics-react-native-plugin-advertising-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 292 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.