Data Subject Request API Version 1 and 2
Data Subject Request API Version 3
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
Bulk Profile Deletion API Reference
Calculated Attributes Seeding API
Data Planning API
Custom Access Roles API
Group Identity 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
Linting Data Plans
Troubleshooting the Android SDK
API Reference
Upgrade to Version 5
Cordova Plugin
Identity
Direct URL Routing FAQ
Web
Android
iOS
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
App Extensions
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
Getting Started
Identity
Upload Frequency
Getting Started
Opt Out
Initialize the SDK
Event Tracking
Commerce Tracking
Error Tracking
Screen Tracking
Identity
Location Tracking
Session Management
Initialization
Content Security Policy
Configuration
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 2 of the SDK
Getting Started
Identity
Web
Alexa
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
Introduction
Outbound Integrations
Firehose Java SDK
Inbound Integrations
Compose ID
Glossary
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
Rules Developer Guide
API Credential Management
The Developer's Guided Journey to mParticle
Create an Input
Start capturing data
Connect an Event Output
Create an Audience
Connect an Audience Output
Transform and Enhance Your Data
The new mParticle Experience
The Overview Map
Introduction
Data Retention
Connections
Activity
Live Stream
Data Filter
Rules
Tiered Events
mParticle Users and Roles
Analytics Free Trial
Troubleshooting mParticle
Usage metering for value-based pricing (VBP)
Introduction
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
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
Understanding the Screen View Event
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
Dashboards––Getting Started
Manage Dashboards
Dashboard Filters
Organize Dashboards
Scheduled Reports
Favorites
Time and Interval Settings in Dashboards
Query Notes in Dashboards
User Aliasing
The Demo Environment
Keyboard Shortcuts
Analytics for Marketers
Analytics for Product Managers
Compare Conversion Across Acquisition Sources
Analyze Product Feature Usage
Identify Points of User Friction
Time-based Subscription Analysis
Dashboard Tips and Tricks
Understand Product Stickiness
Optimize User Flow with A/B Testing
User Segments
IDSync Overview
Use Cases for IDSync
Components of IDSync
Store and Organize User Data
Identify Users
Default IDSync Configuration
Profile Conversion Strategy
Profile Link Strategy
Profile Isolation Strategy
Best Match Strategy
Aliasing
Overview
Create and Manage Group Definitions
Introduction
Catalog
Live Stream
Data Plans
Blocked Data Backfill Guide
Predictive Attributes Overview
Create Predictive Attributes
Assess and Troubleshoot Predictions
Use Predictive Attributes in Campaigns
Predictive Audiences Overview
Using Predictive Audiences
Introduction
Profiles
Warehouse Sync
Data Privacy Controls
Data Subject Requests
Default Service Limits
Feeds
Cross-Account Audience Sharing
Approved Sub-Processors
Import Data with CSV Files
CSV File Reference
Glossary
Video Index
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
mParticle’s .NET MAUI SDK is compatible with iOS and Android apps. The SDK consists of two .Net 8.0 libraries for mParticle’s native iOS and Android SDKs.
Starting in version 2.1.0, this SDK requires using .NET 8+ to support MAUI development. See Microsoft’s policy around the end of support for Xamarin.
This SDK is distributed via the public NuGet gallery: https://www.nuget.org/packages/mParticle.Xamarin/.
If you have both an iOS and an Android project, you should add the NuGet package to each following the Visual Studio Add Package dialog. See here for a detailed walkthrough on using NuGet with Visual Studio.
The SDK must be initialized with your mParticle workspace key and secret prior to use. This call should be placed in your Xamarin or MAUI application initialization, as early as possible:
//use the correct workspace API key and secret for iOS and Android
string key = "REPLACE WITH iOS APP KEY";
string secret = "REPLACE WITH iOS APP SECRET";
MParticle.Instance.Initialize(new MParticleOptions()
{
InstallType = InstallType.KnownUpgrade,
Environment = Environment.Development,
ApiKey = key,
ApiSecret = secret,
IdentifyRequest = new IdentityApiRequest()
{
UserIdentities = new Dictionary<UserIdentity, string>() {
//{ UserIdentity.Yahoo, "tom@yahoo.com" },
{ UserIdentity.IOSAdvertiserId, "C56A4180-65AA-42EC-A945-5FD21DEC0538" },
{ UserIdentity.CustomerId, "Other Identity" }
},
UserAliasHandler = ((previousUser, newUser) => newUser.SetUserAttributes(previousUser.GetUserAttributes()))
},
DevicePerformanceMetricsDisabled = false,
IdDisabled = false,
UploadInterval = 650,
SessionTimeout = 50,
LogLevel = LogLevel.INFO,
ConfigMaxAgeSeconds = 60,
AttributionListener = new AttributionListener()
{
OnAttributionError = error => Console.WriteLine("AttributionError\n" + "Error Message = " + error.Message + "\nService Provider = " + error.ServiceProviderId),
OnAttributionResult = result => Console.WriteLine("AttributionResult\n" + "LinkUrl = " + result.LinkUrl + "\nParameters" + result.Parameters + "\nService Provider" + result.ServiceProviderId)
},
LocationTracking = new LocationTracking("GPS", 100, 350, 22),
PushRegistration = new PushRegistration()
{
AndroidSenderId = "12345-abcdefg",
AndroidInstanceId = "andriod-secret-instance-id",
IOSToken = "09876654321qwerty"
}
});
The Xamarin and MAUI SDK simply provides bindings for mParticle’s iOS and Android SDKs. Refer to the underlying SDK docs for full details on Events. See below for basic implementation examples for MAUI, which all new implementations should be using.
mparticle.LogEvent("AppEvent of type navigation", EventType.Navigation, new Dictionary<string, string>() { { "Cool", "Beans" } });
var product = new Product("Chicken", "SomeSku", 123.43, 22.14) { Brand = "mybrand", Category = "mycategory", CouponCode = "mycoupon", Variant = "myvariant", Position = 12, customAttributes = new Dictionary<string, string>() { { "Tk1", "Tv1" }, { "Tk2", "Tv2" } } };
var product2 = new Product("Noodles", "CoolSku", 12.4, 52.4) { Brand = "mybrand2", Category = "mycategory2", CouponCode = "mycoupon2", Variant = "myvariant2", Position = 3, customAttributes = new Dictionary<string, string>() { { "NTk1", "NTv1" }, { "NTk2", "NTv2" } } };
var products = new Product[] { product, product2 };
var transactionAttributes = new TransactionAttributes("transactionId123") { Affiliation = "Some Affiliation", CouponCode = "Winner", Revenue = 400.21, Tax = 434.98, Shipping = 5.13 };
mparticle.LogCommerceEvent(new CommerceEvent(ProductAction.AddToCart, products) { Currency = "AUD" });
mparticle.LogCommerceEvent(new CommerceEvent(ProductAction.Purchase, products, transactionAttributes) { CustomAttributes = new Dictionary<string, string> { { "TestCommerceAttr", "TestCommerceVal" } } });
mparticle.LogScreen("Home Screen", new Dictionary<string, string>() { { "EventAttributeKey", "EventAttributeValue" } });
While most of mParticle’s integration are server side, several require additional client side libraries called kits. An mParticle Kit is composed of a class that typically wraps a 3rd-party SDK, and maps the mParticle API onto a that SDK’s API.
If you’d like to use one of these client side kits simply follow Microsofts guide for creating .Net Android and iOS Binding Libraries.
Was this page helpful?