Data Subject Request API Version 1 and 2
Data Subject Request API Version 3
Key Management
Platform API Overview
Accounts
Apps
Audiences
Calculated Attributes
Data Points
Feeds
Field Transformations
Services
Users
Workspaces
Warehouse Sync API Overview
Warehouse Sync API Tutorial
Warehouse Sync API Reference
Data Mapping
Warehouse Sync SQL Reference
Warehouse Sync Troubleshooting Guide
ComposeID
Warehouse Sync API v2 Migration
Audit Logs API
Bulk Profile Deletion API Reference
Calculated Attributes Seeding API
Custom Access Roles API
Data Planning API
Household Reach API Reference
Pixel Service
Profile API
Events API
mParticle JSON Schema Reference
IDSync
AMP SDK
Initialization
Configuration
Network Security Configuration
Event Tracking
User Attributes
IDSync
Screen Events
Commerce Events
Location Tracking
Media
Kits
Application State and Session Management
Data Privacy Controls
Error Tracking
Opt Out
Push Notifications
WebView Integration
Logger
Preventing Blocked HTTP Traffic with CNAME
Workspace Switching
Linting Data Plans
Troubleshooting the Android SDK
API Reference
Upgrade to Version 5
Upgrade to Version 6
Cordova Plugin
Identity
Direct URL Routing FAQ
Web
Android
iOS
Getting Started
Identity
Getting Started
Identity
Upgrade to Version 4
Workspace Switching
Initialization
Configuration
Event Tracking
User Attributes
IDSync
Screen Tracking
Commerce Events
Location Tracking
Media
Kits
Application State and Session Management
Data Privacy Controls
Error Tracking
Opt Out
Push Notifications
Webview Integration
Upload Frequency
Preventing Blocked HTTP Traffic with CNAME
Linting Data Plans
Troubleshooting iOS SDK
Social Networks
iOS 14 Guide
iOS 15 FAQ
iOS 16 FAQ
iOS 17 FAQ
iOS 18 FAQ
API Reference
Upgrade to Version 7
Upgrade to Version 9
Upload Frequency
Getting Started
Opt Out
Initialize the SDK
Event Tracking
Commerce Tracking
Error Tracking
Screen Tracking
Identity
Location Tracking
Session Management
Initialization
Configuration
Content Security Policy
Event Tracking
User Attributes
IDSync
Page View Tracking
Commerce Events
Location Tracking
Media
Kits
Application State and Session Management
Data Privacy Controls
Error Tracking
Opt Out
Custom Logger
Persistence
Native Web Views
Self-Hosting
Multiple Instances
Web SDK via Google Tag Manager
Preventing Blocked HTTP Traffic with CNAME
Facebook Instant Articles
Troubleshooting the Web SDK
Browser Compatibility
Linting Data Plans
API Reference
Upgrade to Version 3 of the SDK
Alexa
Introduction
Outbound Integrations
Firehose Java SDK
Inbound Integrations
Compose ID
Data Hosting Locations
Migrate from Segment to mParticle
Migrate from Segment to Client-side mParticle
Migrate from Segment to Server-side mParticle
Segment-to-mParticle Migration Reference
Glossary
Rules Developer Guide
Overview
Step 1. Create an input
Step 2. Verify your input
Step 3. Set up your output
Step 4. Create a connection
Step 5. Verify your connection
Step 6. Track events
Step 7. Track user data
Step 8. Create a data plan
Step 9. Test your local app
Overview
Step 1. Create an input
Step 2. Verify your input
Step 3. Set up your output
Step 4. Create a connection
Step 5. Verify your connection
Step 6. Track events
Step 7. Track user data
Step 8. Create a data plan
Overview
Step 1. Create an input
Step 2. Verify your input
Step 3. Set up your output
Step 4. Create a connection
Step 5. Verify your connection
Step 6. Track events
Step 7. Track user data
Step 8. Create a data plan
Step 1. Create an input
Step 2. Create an output
Step 3. Verify output
Node SDK
Go SDK
Python SDK
Ruby SDK
Java SDK
API Credential Management
The Developer's Guided Journey to mParticle
Introduction
Navigating mParticle
The Overview Map
Create an Input
Start capturing data
Connect an Event Output
Create an Audience
Connect an Audience Output
Transform and Enhance Your Data
Overview
Explore Your Data
Build Audiences
Create Predictions
Data and Privacy
mParticle Agent FAQ
System Alerts
Trends
Connections
Feeds
Import Data with CSV Files
CSV File Reference
SFTP Credentials
Live Stream
Data Catalog
Rules
Plans
Filters
Event Forwarding
Event Match Quality
Data Retention
Tiered Events
Blocked Data Backfill Guide
Warehouse Setup Overview
Overview
Overview
User Profiles
Identity Dashboard
Identity Resolution Log
Household Reach
Calculated Attributes Overview
Using Calculated Attributes
Create with AI Assistance
Calculated Attributes Reference
Predictions Overview
What's Changed in the New Predictions UI
View and Manage Predictions
Future Behavior Predictions Overview
Create Future Behavior Prediction
Manage Future Behavior Predictions
Create an Audience with Future Behavior Predictions
Introduction
Core Analytics (Beta)
Analytics Free Trial
Sync and Activate Analytics User Segments in mParticle
User Segment Activation
Welcome Page Announcements
Project Settings
Roles and Teammates
Organization Settings
Global Project Filters
Portfolio Analytics
Analytics Data Manager Overview
Events
Event Properties
User Properties
Revenue Mapping
Export Data
UTM Guide
Analyses Introduction
Getting Started
Visualization Options
For Clauses
Date Range and Time Settings
Calculator
Numerical Settings
Assisted Analysis
Properties Explorer
Frequency in Segmentation
Trends in Segmentation
Did [not] Perform Clauses
Cumulative vs. Non-Cumulative Analysis in Segmentation
Total Count of vs. Users Who Performed
Save Your Segmentation Analysis
Export Results in Segmentation
Explore Users from Segmentation
Getting Started with Funnels
Group By Settings
Conversion Window
Tracking Properties
Date Range and Time Settings
Visualization Options
Interpreting a Funnel Analysis
Group By
Filters
Conversion over Time
Conversion Order
Trends
Funnel Direction
Multi-path Funnels
Analyze as Cohort from Funnel
Save a Funnel Analysis
Explore Users from a Funnel
Export Results from a Funnel
Saved Analyses
Manage Analyses in Dashboards
Data Dictionary
Query Builder Overview
Modify Filters With And/Or Clauses
Query-time Sampling
Query Notes
Filter Where Clauses
Event vs. User Properties
Group By Clauses
Annotations
Cross-tool Compatibility
Apply All for Filter Where Clauses
Date Range and Time Settings Overview
User Attributes at Event Time
Understanding the Screen View Event
User Aliasing
Dashboards––Getting Started
Manage Dashboards
Dashboard Filters
Organize Dashboards
Scheduled Reports
Favorites
Time and Interval Settings in Dashboards
Query Notes in Dashboards
The Demo Environment
Keyboard Shortcuts
User Segments
Analytics for Marketers
Analytics for Product Managers
Compare Conversion Across Acquisition Sources
Analyze Product Feature Usage
Time-based Subscription Analysis
Identify Points of User Friction
Dashboard Tips and Tricks
Understand Product Stickiness
Optimize User Flow with A/B Testing
Single Sign-On (SSO)
Setup Examples
Introduction
Introduction
Introduction
Rudderstack
Google Tag Manager
Segment
Advanced Data Warehouse Settings
AWS Kinesis (Snowplow)
AWS Redshift (Define Your Own Schema)
AWS S3 Integration (Define Your Own Schema)
AWS S3 (Snowplow Schema)
BigQuery (Snowplow Schema)
BigQuery Firebase Schema
BigQuery (Define Your Own Schema)
GCP BigQuery Export
Snowflake (Snowplow Schema)
Snowplow Schema Overview
Snowflake (Define Your Own Schema)
Aliasing
Audiences Overview
Create an Audience
Connect an Audience
Manage Audiences
Audience Insights
Audience Sharing
Match Boost
Inclusive & Exclusive Audiences Overview
Using Logic Blocks in Audiences
Combining Inclusive and Exclusive Audiences
Inclusive & Exclusive Audiences FAQ
Audience Expansion
Predictive Audiences Overview
Using Predictive Audiences
Composable Audiences Overview
User Guide Overview
Audience Setup
Frequently Asked Questions
Troubleshooting mParticle
Default Service Limits
Glossary
Event
Audience
Audience
Event
Feed
Audience
Cookie Sync
Server-to-Server Events
Platform SDK Events
Audience
Audience
Event
Feed
Audience
Event
Event
Event
Data Warehouse
Event
Event
Audience
Event
Feed
Event
Event
Event
Audience
Event
Event
Feed
Event
Event
Feed
Audience
Event
Event
Event
Custom Feed
Data Warehouse
Event
Event
Audience
Audience
Event
Audience
Audience
Event
Event
Event
Event
Event
Audience
Audience
Event
Event
Event
Audience
Data Warehouse
Event
Audience
Cookie Sync
Event
Event
Event
Event
Event
Feed
Feed
Event
Event
Event
Kit
Audience
Event
Event
Audience
Event
Event
Feed
Event
Audience
Event
Audience
Event
Audience
Event
Audience
Audience
Audience
Microsoft Ads Audience Integration
Audience
Event
Event
Event
Event
Event
Feed
Event
Event
Event
Event
Event
Audience
Feed
Event
Event
Event
Event
Event
Event
Event
Feed
Event
Event
Event
Event
Audience
Event
Feed
Custom Pixel
Event
Event
Event
Event
Audience
Audience
Data Warehouse
Event
Event
Event
Event
Audience
Audience
Feed
Event
Loyalty Feed
Audience
Audience
Event
Audience
Audience
Feed
Event
Cookie Sync
Event
Audience
Audience
Event
Audience
Audience
Event
Audience
Event
Event
Event
Audience
Cookie Sync
Audience
Cookie Sync
Feed
Audience
Event
Version 4 of react-native-mparticle introduces two breaking changes: the native iOS mParticle SDK and kits come from Swift Package Manager (SPM) by default, and MParticle.Rokt.selectPlacements accepts only an array of placeholder names for embedded placements.
This guide covers upgrades from 3.x. For a new integration, follow Getting Started. If you are upgrading from 2.x or earlier, also follow Migrating from versions below 3.0.0 for the underlying native SDK changes.
Update the wrapper package, then follow the platform steps below before building:
npm install react-native-mparticle@^4.0.0With Expo, use npx expo install react-native-mparticle@^4.0.0 instead.
React Native and the wrapper still install through CocoaPods. Running pod install now links the mParticle core SDK and configured kits into your app target as Swift packages pinned to exact versions. The default Apple SDK version is selected and tested for your installed wrapper release. Kits without an explicit version use the core SDK version.
An app without kits or manually declared native SDK dependencies needs no dependency configuration change. For apps with kit pods or manually linked packages:
ios/Podfile, including mParticle-Apple-SDK, its split ObjC/Swift pods, mParticle-Rokt, Rokt-Widget, RoktSDKPlus, and any directly declared RoktContracts, RoktUXHelper, DcuiSchema, or RoktPaymentExtension pods.pre_install hook that builds them as dynamic frameworks. Delete the hook if it has no other entries; keep configuration needed by other dependencies.Set platform :ios, '15.6' or later, and list your kits before the first target block. For standard Rokt placements:
platform :ios, '15.6'
$RNMParticleSPMKits = ['mParticle-Rokt']For iOS Shoppable Ads, use ['RoktSDKPlus'] instead. It includes mParticle-Rokt and RoktPaymentExtension; do not list both kits. For other kits and optional exact version overrides, see SPM configuration.
bundle exec pod install from ios/. If a pod would install a second copy of the SDK, installation stops and lists the pods to remove..xcodeproj change and ios/<App>.xcworkspace/xcshareddata/swiftpm/Package.resolved.The default static-library setup and both use_frameworks! linkages are supported without a mParticle pre_install hook. Swift initialization continues using import mParticle_Apple_SDK.
On each pod install, kits from the maintained catalog that are absent from $RNMParticleSPMKits are unlinked. Remove packages from custom URLs manually in Xcode when you stop using them.
Keep your iosKits configuration: the plugin maps recognized names to Swift packages by default. Use iosSpmKits for kits outside the maintained catalog.
Set the iOS deployment target to 15.6 or later through expo-build-properties; the mParticle plugin does not set it. Clean prebuilds regenerate the native project and its package lockfile, but the same wrapper release and configuration select the same exact core SDK version. Set iosSdkVersion only for an intentional override. Kits without an explicit version use the core version. See the Expo setup for the configuration example.
Run npx expo prebuild --clean, then npx expo run:ios. Also run a clean prebuild whenever you switch iosDependencyManager between "spm" and "cocoapods".
For Shoppable Ads, use "iosKits": ["RoktSDKPlus"]. After prebuild, add native payment-extension registration following the Rokt setup instructions, and reapply it after regenerating native projects.
To retain native CocoaPods dependencies temporarily, set $RNMParticleDisableSPM = true before the first Podfile target block and retain your kit pods. In Expo, set "iosDependencyManager": "cocoapods".
If any tvOS target in the Podfile uses this wrapper, the whole Podfile must use this fallback. The minimum tvOS deployment target is 15.6. The default SPM integration supports iOS only.
Remove leftover mParticle/Rokt Swift packages in Xcode when switching to CocoaPods. Keep the required framework-linking configuration and, for Swift apps without kits, the umbrella-pod declaration described in CocoaPods setup.
This fallback is deprecated. CocoaPods trunk is scheduled to stop accepting new pods and versions on December 2, 2026; existing published versions remain available. SPM-only kits such as RoktSDKPlus cannot use the fallback.
MParticle.Rokt.selectPlacements now accepts placeholders?: string[]. Each entry must match the placeholderName of a RoktLayoutView. The previous map of placeholder names to findNodeHandle node handles has been removed on both iOS and Android. Version 3.4.0 supports both forms, so you can migrate to names before upgrading to 4.x.
Before, with a node-handle map:
import React, { useRef } from 'react';
import { findNodeHandle, View } from 'react-native';
import MParticle from 'react-native-mparticle';
function EmbeddedPlacement({ email, firstname }) {
const placeholderRef = useRef(null);
const onPlaceholderLayout = () => {
const attributes = { email, firstname };
MParticle.Rokt.selectPlacements('RoktExperience', attributes, {
Location1: findNodeHandle(placeholderRef.current),
});
};
return (
<View onLayout={onPlaceholderLayout}>
<MParticle.RoktLayoutView ref={placeholderRef} placeholderName="Location1" />
</View>
);
}After, with placeholder names:
import React, { useEffect } from 'react';
import MParticle from 'react-native-mparticle';
function EmbeddedPlacement({ email, firstname }) {
useEffect(() => {
const attributes = { email, firstname };
MParticle.Rokt.selectPlacements('RoktExperience', attributes, ['Location1']);
}, [email, firstname]);
return <MParticle.RoktLayoutView placeholderName="Location1" />;
}This example selects placements on mount and when the email or firstname string changes. Build the attributes object inside the effect and include each value it uses in the dependency list. If you instead depend on an attributes object passed by a parent, keep that object referentially stable (for example, with useMemo) so unrelated renders do not send another placement request.
Remove the ref, findNodeHandle import, and any onLayout handler or timer used to wait for the view to mount. The named view can mount after the request starts.
For overlays, omit the placeholders argument. If you pass a configuration as the fourth argument, use undefined for placeholders:
MParticle.Rokt.selectPlacements('RoktOverlay', attributes);
const config = MParticle.Rokt.createRoktConfig('system');
MParticle.Rokt.selectPlacements('RoktOverlay', attributes, undefined, config);TypeScript rejects the old map. If plain JavaScript passes a map, the SDK logs an error and sends the request without embedded views. An empty object ({}) is also a map; use an omitted argument or undefined for overlays.
Check these behaviors after migration:
Cannot resolve placeholder; the request proceeds with the views available when the wait ends.MParticle.Rokt.close() runs, or a newer call with the same identifier supersedes a pending request before its placeholders mount, the waiting call emits PlacementFailure.Follow the Rokt placement guide for complete placement and event-handling examples.
Native Android initialization continues as before. The wrapper supplies its required android-core dependency automatically. Apps using MParticle.Rokt.* or RoktLayoutView must also declare the matching Rokt kit, which is not bundled by the wrapper:
implementation 'com.mparticle:android-rokt-kit:COMPATIBLE_VERSION_OR_RANGE'Replace COMPATIBLE_VERSION_OR_RANGE with the android-rokt-kit version or range declared in node_modules/react-native-mparticle/android/build.gradle for your installed wrapper release (source). With Expo, use "androidKits": ["android-rokt-kit"] in the plugin options; the plugin adds the kit dependency.
The Rokt kit requires compileSdk 35+ and Android Gradle Plugin 8.6+. Apply the placeholder migration on Android as well. Shoppable Ads remains iOS only.
Was this page helpful?