Documentation

Developers

API References
Data Subject Request API

Data Subject Request API Version 1 and 2

Data Subject Request API Version 3

Platform API

Platform API Overview

Accounts

Apps

Audiences

Calculated Attributes

Data Points

Feeds

Field Transformations

Services

Users

Workspaces

Warehouse Sync API

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

Custom Access Roles API

Bulk Profile Deletion API Reference

Data Planning API

Group Identity API Reference

Calculated Attributes Seeding API

Pixel Service

Profile API

Events API

mParticle JSON Schema Reference

IDSync

Client SDKs
AMP

AMP SDK

Android

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

Cordova Plugin

Identity

Direct Url Routing

Direct URL Routing FAQ

Web

Android

iOS

Flutter

Getting Started

Usage

API Reference

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

React Native

Getting Started

Identity

Roku

Getting Started

Identity

Media

Unity

Upload Frequency

Getting Started

Opt Out

Initialize the SDK

Event Tracking

Commerce Tracking

Error Tracking

Screen Tracking

Identity

Location Tracking

Session Management

Xbox

Getting Started

Identity

Web

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 2 of the SDK

Xamarin

Getting Started

Identity

Web

Alexa

Media SDKs

iOS

Web

Android

Quickstart
Android

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

HTTP Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

iOS Quick Start

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

Java Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Node Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Python Quick Start

Step 1. Create an input

Step 2. Create an output

Step 3. Verify output

Web

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

Server SDKs

Node SDK

Go SDK

Python SDK

Ruby SDK

Java SDK

Tools

mParticle Command Line Interface

Linting Tools

Smartype

Guides
Partners

Introduction

Outbound Integrations

Outbound Integrations

Firehose Java SDK

Inbound Integrations

Kit Integrations

Overview

Android Kit Integration

JavaScript Kit Integration

iOS Kit Integration

Compose ID

Data Hosting Locations

Glossary

Migrate from Segment to mParticle

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

Guides

Getting Started

Create an Input

Start capturing data

Connect an Event Output

Create an Audience

Connect an Audience Output

Transform and Enhance Your Data

Platform Guide
The New mParticle Experience

The new mParticle Experience

The Overview Map

Observability

Observability Overview

Observability User Guide

Observability Span Glossary

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)

Analytics

Introduction

Setup

Sync and Activate Analytics User Segments in mParticle

User Segment Activation

Welcome Page Announcements

Settings

Project Settings

Roles and Teammates

Organization Settings

Global Project Filters

Portfolio Analytics

Analytics Data Manager

Analytics Data Manager Overview

Events

Event Properties

User Properties

Revenue Mapping

Export Data

UTM Guide

Query Builder

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

Analyses Introduction

Segmentation: Basics

Getting Started

Visualization Options

For Clauses

Date Range and Time Settings

Calculator

Numerical Settings

Segmentation: Advanced

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

Funnels: Basics

Getting Started with Funnels

Group By Settings

Conversion Window

Tracking Properties

Date Range and Time Settings

Visualization Options

Interpreting a Funnel Analysis

Funnels: Advanced

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

Cohorts

Getting Started with Cohorts

Analysis Modes

Save a Cohort Analysis

Export Results

Explore Users

Saved Analyses

Manage Analyses in Dashboards

Journeys

Getting Started

Event Menu

Visualization

Ending Event

Save a Journey Analysis

Users

Getting Started

User Activity Timelines

Time Settings

Export Results

Save A User Analysis

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

Analytics Resources

The Demo Environment

Keyboard Shortcuts

Tutorials

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

APIs

User Segments Export API

Dashboard Filter API

IDSync

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

Data Master
Group Identity

Overview

Create and Manage Group Definitions

Introduction

Catalog

Live Stream

Data Plans

Data Plans

Blocked Data Backfill Guide

Personalization
Predictive Attributes

Predictive Attributes Overview

Create Predictive Attributes

Assess and Troubleshoot Predictions

Use Predictive Attributes in Campaigns

Predictive Audiences

Predictive Audiences Overview

Using Predictive Audiences

Introduction

Profiles

Calculated Attributes

Calculated Attributes Overview

Using Calculated Attributes

Create with AI Assistance

Calculated Attributes Reference

Audiences

Audiences Overview

Real-time Audiences

Standard Audiences

Journeys

Journeys Overview

Manage Journeys

Download an audience from a journey

Audience A/B testing from a journey

Journeys 2.0

Warehouse Sync

Data Privacy Controls

Data Subject Requests

Default Service Limits

Feeds

Cross-Account Audience Sharing

Approved Sub-Processors

Import Data with CSV Files

Import Data with CSV Files

CSV File Reference

Glossary

Video Index

Analytics (Deprecated)
Identity Providers

Single Sign-On (SSO)

Setup Examples

Settings

Debug Console

Data Warehouse Delay Alerting

Introduction

Developer Docs

Introduction

Integrations

Introduction

Rudderstack

Google Tag Manager

Segment

Data Warehouses and Data Lakes

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)

APIs

Dashboard Filter API (Deprecated)

REST API

User Segments Export API (Deprecated)

SDKs

SDKs Introduction

React Native

iOS

Android

Java

JavaScript

Python

Object API

Developer Basics

Aliasing

Integrations

24i

Event

Abakus

Event

ABTasty

Audience

Aarki

Audience

AdChemix

Event

Actable

Feed

Adikteev

Audience

Event

Adjust

Event

Feed

Adobe Marketing Cloud

Event

Cookie Sync

Adobe Audience Manager

Audience

Adobe Campaign Manager

Audience

AdMedia

Audience

Adobe Target

Audience

AgilOne

Event

AdPredictive

Feed

Airship

Audience

Feed

Event

Algolia

Event

Alooma

Event

AlgoLift

Feed

Event

Amazon Advertising

Audience

Amazon Kinesis

Event

Amazon Kinesis Firehose

Audience

Event

Amazon Redshift

Data Warehouse

Amazon S3

Event

Amazon SNS

Event

Adobe Marketing Cloud

Event

Amazon SQS

Event

Amobee

Audience

Ampush

Audience

Event

Amplitude

Event

Forwarding Data Subject Requests

Analytics

Audience

Event

Forwarding Data Subject Requests

Anodot

Event

AppsFlyer

Event

Feed

Forwarding Data Subject Requests

Antavo

Feed

Apptentive

Event

Apptimize

Event

Apteligent

Event

Attentive

Event

Feed

Attractor

Event

Batch

Event

Audience

Microsoft Azure Blob Storage

Event

Bidease

Audience

Bing Ads

Event

Bluecore

Event

Bluedot

Feed

Blueshift

Event

Feed

Forwarding Data Subject Requests

Branch S2S Event

Event

Branch

Event

Feed

Forwarding Data Subject Requests

Bugsnag

Event

Braze

Audience

Feed

Forwarding Data Subject Requests

Event

Button

Audience

Event

Cadent

Audience

Census

Feed

ciValue

Event

Feed

CleverTap

Audience

Event

Feed

comScore

Event

Conversant

Event

Cordial

Audience

Feed

Cortex

Event

Feed

Forwarding Data Subject Requests

Criteo

Audience

Event

Crossing Minds

Event

Custom Feed

Custom Feed

CustomerGlu

Event

Feed

Customer.io

Audience

Event

Feed

Databricks

Data Warehouse

Didomi

Event

Datadog

Event

Dynamic Yield

Event

Audience

Dynalyst

Audience

Edge226

Audience

Emarsys

Audience

Epsilon

Event

Everflow

Audience

Facebook

Audience

Event

Fiksu

Audience

Event

Facebook Offline Conversions

Event

Google Analytics for Firebase

Event

Flybits

Event

ForeSee

Event

AppLovin

Audience

Event

Formation

Event

Feed

Flurry

Event

Google Ad Manager

Audience

Foursquare

Feed

Audience

FreeWheel Data Suite

Audience

Google Analytics

Event

Google Ads

Audience

Event

Google BigQuery

Audience

Data Warehouse

Google Analytics 4

Event

Google Enhanced Conversions

Event

Google Cloud Storage

Audience

Event

Google Marketing Platform

Cookie Sync

Audience

Event

Google Pub/Sub

Event

Google Tag Manager

Event

Google Marketing Platform Offline Conversions

Event

Heap

Event

Herow

Feed

Hightouch

Feed

Hyperlocology

Event

Impact

Event

Ibotta

Event

Indicative

Audience

Event

InMarket

Audience

InMobi

Audience

Event

Insider

Feed

Audience

Event

Inspectlet

Event

iPost

Audience

Feed

Intercom

Event

ironSource

Audience

Jampp

Audience

Event

Iterable

Event

Feed

Audience

Kafka

Event

Kayzen

Event

Audience

Kissmetrics

Event

Klaviyo

Audience

Event

Kubit

Event

Kochava

Event

Feed

Forwarding Data Subject Requests

LifeStreet

Audience

LaunchDarkly

Feed

Leanplum

Audience

Event

Feed

Liftoff

Event

Audience

Liveramp

Audience

Localytics

Event

LiveLike

Event

MadHive

Audience

Mailchimp

Audience

Event

Feed

Marigold

Audience

mAdme Technologies

Event

Mautic

Audience

Event

MediaMath

Audience

Mediasmart

Audience

Microsoft Azure Event Hubs

Event

Mixpanel

Audience

Event

Forwarding Data Subject Requests

Mintegral

Audience

MoEngage

Audience

Event

Feed

Monetate

Event

Moloco

Audience

Event

Movable Ink

Event

Multiplied

Event

Movable Ink - V2

Event

myTarget

Event

Audience

Nanigans

Event

Nami ML

Feed

Narrative

Audience

Event

Feed

Neura

Event

NCR Aloha

Event

OneTrust

Event

Optimizely

Audience

Event

Oracle BlueKai

Event

Persona.ly

Audience

Paytronix

Feed

Oracle Responsys

Audience

Event

Personify XP

Event

PieEye

Inbound Data Subject Requests

Pinterest

Event

Audience

Pilgrim

Event

Feed

Plarin

Event

Postie

Event

Audience

Primer

Event

Punchh

Audience

Event

Feed

Qualtrics

Event

Quantcast

Event

Radar

Event

Feed

Regal

Event

Reddit

Audience

Event

Remerge

Audience

Event

Retina AI

Event

Feed

Reveal Mobile

Event

RevenueCat

Feed

RTB House

Audience

Event

Rokt

Audience

Sailthru

Event

Audience

Salesforce Email

Audience

Feed

Event

Salesforce Mobile Push

Event

Samba TV

Audience

Event

SendGrid

Audience

Feed

Scalarr

Event

ShareThis

Audience

Feed

SessionM

Event

Feed

Shopify

Custom Pixel

Feed

Signal

Event

SimpleReach

Event

Singular

Feed

Event

Singular-DEPRECATED

Event

Skyhook

Event

Slack

Event

Smadex

Audience

SmarterHQ

Event

Snapchat

Audience

Event

Snapchat Conversions

Event

Snowplow

Event

Snowflake

Data Warehouse

Split

Event

Feed

Splunk MINT

Event

Sprig

Audience

Event

StartApp

Audience

Statsig

Event

Feed

Stormly

Audience

Event

Swrve

Event

Feed

Talon.One

Audience

Event

Feed

Tapad

Audience

Tapjoy

Audience

Taptica

Audience

Taplytics

Event

Teak

Audience

The Trade Desk

Audience

Cookie Sync

Event

TikTok Event

Audience

Audience (Deprecated)

Event

Audience Migration

Ticketure

Feed

Treasure Data

Audience

Event

TUNE

Event

Twitter

Audience

Event

Triton Digital

Audience

Valid

Event

Vkontakte

Audience

Voucherify

Audience

Event

Vungle

Audience

Webhook

Event

Webtrends

Event

White Label Loyalty

Event

Wootric

Event

Xandr

Cookie Sync

Audience

Yahoo (formerly Verizon Media)

Cookie Sync

Audience

Yotpo

Feed

YouAppi

Audience

Z2A Digital

Audience

Event

Zendesk

Feed

Event

Quadratic Labs

Event

Pushwoosh

Event

Audience

Event

Track purchases, signups and conversions from Google Ads and create Customer Match lists for targeting.

This integration utilizes Google’s Mobile Apps Conversion Tracking and Remarketing API.

There are three distinct ways of integrating with Google Ads from mParticle

This topic will cover using and setting up all of these types of implementations separately.

Native Apps Integration

Regardless of whether you are using iOS, tvOS, or Android, you must first create Link IDs that allow mParticle to send data for your app to use the Google Ads integration.

To use the Google Ads integration, you will need to create a Link ID for your Google Ads account.

Required Settings

Note that, apart from the Link ID, other settings are not required, and are only present in the Dashboard to support an older version of the integration used by a few legacy customers.

To create a Link ID, do the following:

  1. From the Google Ads dashboard, click Tools > Setup section > select Linked Accounts
  2. Navigate to the Third-party app analytics tile, click Details, select Create Link ID
  3. Navigate to App analytics provider > Other provider, and enter mParticle’s provider ID:
  • 4353943319
  1. Select your app’s platform and find your app in the Look up your app field.
  2. Click the CREATE LINK ID button. The screen refreshes to show you the Third-party app analytics page with the LINK IDs you’ve just created.

You will use this Link ID in the mParticle app when you create a output connection in the Connection Output dialog.

Data Mapping (Native Apps and Web)

Google’s current conversion tracking API supports a standard list of event types. mParticle events are automatically mapped to the appropriate Google Ads events as follows. The following table shows the data mapping for both native apps and Web.

Supported Events

Google Ads Event mParticle Event
first_open Application State Transition, where install is true and upgrade is false.
session_start Session Start
view_item Commerce Event with a Product Action type of view_detail
add_to_cart Commerce Event with a Product Action type of add_to_cart
ecommerce_purchase Commerce Event with a Product Action type of purchase
custom App Event

Unsupported Events

Google Ads Event Notes
in_app_purchase This event should be used only for purchase made in Google Play. For other purchases, use the ecommerce_purchase event.
view_item_list
view_search_results

Commerce Event Expansion

When forwarding Commerce Events, mParticle forwards the main event - ecommerce_purchase, add_to_cart, or view_item - including the event attributes and transaction ID, plus one custom event for each Product, including the event attributes, product attributes and the Transaction ID.

Attribute Mapping

Google Ads Attribute mParticle Attribute
app_event_name event_name (for App Event only)
rdid (Raw Device ID) ios_advertising_id or android_advertising_id
id_type "idfa" (iOS, tvOS) OR "advertisingid" (Android)
lat device_info.limit_ad_tracking
app_version application_info.version
os_version device_info.version_release (iOS, tvOS) OR device_info.version_release (Android)
sdk_version "mparticle-sdk-i-v<device_info.sdk_version>" (iOS, tvOS) OR "mparticle-sdk-a-v<device_info.sdk_version>" (Android)
timestamp timestamp_unixtime_ms
value product_action.total_amount (purchase only)
currency_code currency_code

Web Integration

The Google Ads integration requires the mParticle Google Ads Kit when connected to a web input. If you are initializing the web SDK using the Snippet Option then the Kit is automatically included for you. If you are Self Hosting the SDK then you need to add this kit manually into your source code.

The following settings are used for Web-specific configurations. These are the parameters you would set when setting up a Web-specific connection if you are forwarding data collected by mParticle to Google Ads.

Creating a Conversion ID and Label

You need to create a Conversion ID before you can use the Web integration for Google Ads. The instructions for creating a Conversion ID can be found at the following Google support page:

  1. It is recommended to click the New tab and follow the instructions on that page to generate a new Conversion ID.
  2. Once you have followed the steps to create a Conversion ID, you must select the Conversion IDs for the Event snippet. You will see a similar dialogue box as below.

  1. In the gtag function invocation, the last argument is an object with a key of send_to and a value in the format of “AW-CONVERSIONID/LABEL”. In the above example, the Conversion ID is 753728982 and the label is nl4-CKuq25wBENb7s-cC Enter your Conversion ID in the Event Configuration Settings when you add an event output:

  1. Enter your label in the Connection Settings once you connect Google Ads to Javascript as an output:

  1. In the mParticle app, set up the configuration (explained in the Configuration Settings section), and then configure the connection (explained in the Connection Settings section).

Using mParticle’s Events API

If you are using mParticle’s Android, iOS, or tvOS SDK, the user agent string is automatically collected for you. If you are not using these SDKs, this section explains how to construct the user agent string.

Constructing a Correctly Formed User-Agent Header

The Google Ads integration utilizes Google’s Mobile Apps Conversion Tracking and Remarketing API. This requires a correctly formatted User-Agent header, retrieved from information about the device.

If you are forwarding data collected by mParticle’s native SDKs, the required information is collected automatically. Note that the one required field is the Advertising ID in the user agent header.

If other values are not present in a batch received using the Events API, mParticle will still attempt to construct a User Agent Header, based on default values. However, mParticle cannot guarantee that this header will be accepted by Google Ads. Therefore, it is important to provide accurate values.

As explained previously, if you are not using mParticle’s Android, iOS, or tvOS SDKs (or are using the mParticle Events API), you will need to ensure the following fields are provided.

mParticle Field Device Type Notes
device_info.ios_advertising_id iOS, tvOS Required. Will return an error if not present
device_info.os_version iOS, tvOS iOS version number
device_info.android_advertising_id Android only
device_info.build_version_release Android only Android version number
device_info.locale_language Android, iOS, tvOS 2-character ISO 639-1 Language Code
device_info.locale_country Android, iOS, tvOS 2-character ISO 3166-1 Country Code
device_info.device_model Android, iOS, tvOS Model of the device, e.g. iPhone6,1
application_info.application_version Android, iOS, tvOS Version number of your app
device_info.build_identifier Android, iOS, tvOS Build number of the operating system. See the section below about Obtaining Your Build Identifier

Obtaining Your Build Identifier

One of the required fields to be included in the user agent string is the build identifier. In order to retrieve the build identifier, you can use one of the following code snippets to retrieve it.

To obtain the device_info.build_identifier value:

String buildId = Build.ID;
@import Darwin.sys.sysctl;

NSString *buildId(void) {
  size_t bufferSize = 64;
  NSMutableData *buffer =
    [[NSMutableData alloc]
      initWithLength:bufferSize];
  int status =
    sysctlbyname("kern.osversion",
      buffer.mutableBytes,
      &bufferSize, NULL, 0);
  if (status != 0) {
    return nil;
  }
  return [[NSString alloc]
    initWithCString:buffer.mutableBytes
    encoding:NSUTF8StringEncoding];
}

Enhanced Conversions

When using the Google Ads web integration, you have the option of leveraging Google’s Enhanced Conversions. This allows you to send first-party customer data to Google in a secure way. Read more about Google’s Enhanced Conversions and how to set it up on Google’s side here.

Prerequisites

  • mParticle prequisites:

    • Your web workspace needs to be configured for event batching in order to leverage Enhanced Conversions. If it is not configured for event batching, please contact your customer success manager. To determine if you are on web batching, follow the instructions here.
    • Check both Enable Google Site Tag and Enable Enhanced Conversions in connection settings.

Creating a Conversion ID and Label

As with non-enhanced conversions, you will need to create a Conversion ID. Follow those directions from above.

Additionally, there are a few extra steps to set up enhanced conversions in Google’s set up page:

  1. Under Enhanced conversions, select Turn on enhanced conversions.
  2. Under Implementation Method, select Global site tag or Google Tag Manager and press NEXT.
  3. You will be prompted for your URL. Enter that into the text field and click CHECK URL.

  1. If mParticle loads Google Tag Manager dynamically for you, Google tells you that the tracking tag was not detected. Click on select one manually. If you don’t see this message, go to the next step.
  2. Click the Global site tag radio button and press NEXT.

  1. Select Edit code from the drop down for how you want to set up enhanced conversions.

After completing the set up from Google’s side, you are ready to send Enhanced Conversions via mParticle to Google. Following the Test Search example below, simply pass unhashed first-party data, to the custom flag "GoogleAds.ECData" as a Custom Flag containing a stringified JSON Object.

The format of your first party data should follow Google’s support docs here under Identify and define your enhanced conversions variables. See below for a full example:

mParticle.logEvent(
  'Test Search',
  mParticle.EventType.Search,
  { attr1: 'value1' },
  { "GoogleAds.ECData": JSON.stringify({
    email: 'test@gmail.com',
    phone_number: '1-911-867-5309',
    first_name: 'John',
    last_name: 'Doe',
    home_address: {
        street: '123 Main St',
        city: 'San Francisco',
        region: 'CA',
        postal_code: '12345',
        country: 'US',
    }});
}); 

Per Google’s best practices, mParticle passes a unique ID for each event to Google in the form of a transaction_id in order to de-duplicate events. If you are logging a purchase event, you are required to provide a transaction ID. Otherwise, the mParticle Web SDK automatically assigns all non-purchase commerce events, page views, and custom events a transaction_id.

Google Ads has several notions of user-provided consent. Two of these apply to the S2S Google Ads events: ad_user_data and ad_personalization. These represent consent for ad user data and ad personalization.

For Web Customers using Google Ads Consent Mode, Google provides two additional fields: ad_storage and analytics_storage.

Additionally, based on the configured connection setting, server-to-server calls for iOS, Android and tvOS will indicate whether European regulations apply.

To configure user consent forwarding under this value, a mapping should be set-up leveraging mParticle’s notion of Consent Purposes. To learn more about handling user consent within mParticle’s platform, see the following docs: Data Privacy Controls.

Once a Consent Purpose is set up, user consent information can be associated with it in subsequent Event Batches. The Consent Purpose data mapping can then be configured for downstream forwarding via the User Consent Data Mapping connection setting.

In the absence of a user-defined consent value for the ad_user_data, ad_personalization, ad_storage, and analytics_storage fields via the Consent Purpose mapping, a default value can be optionally configured via a separate drop-down setting for each consent type. When no user consent is provided, the default status is used, if specified. If omitted, the Unspecified status will be sent.

Caution: It is recommended that in the long term, you set up user-specified consent through the Consent Purpose mapping, such that the user consent is correctly forwarded to Google. It is your responsibility as a Data Controller to stay compliant under the GDPR, and set up user consent collection for downstream forwarding. The consent default setting can be deprecated in the future.

mParticle follows Google’s recommendations when forwarding consent state defaults and consent state updates. However, the Web kit behaves differently depending on how your default consent states are configured:

  • If your consent state default is set to Denied or Granted:

    • Whenever a user changes their consent state away from the default, the Web kit forwards the new value downstream the next time a custom event or page view event is triggered.
    • Whenever a page is refreshed or the kit is re-initialized, the default consent states are automatically forwarded downstream, along with any consent state changes the user may have made.
  • If your consent state default is set to Unspecified:

    • As soon as a user accepts or denies the consent purposes specified in your connection settings, the mapped consent states are set as the defaults after a page is refreshed or the kit is re-initialized. These new consent state defaults are then forwarded downstream.

mParticle App Configuration/Connection Settings (Native Apps/Web)

Regardless of whether you’re configuring/sending data from a Native Apps/Web platform, the following parameters must be set in the mParticle app. The tables below will guide you through what the parameters are and the platform to which they apply.

Configuration Settings

You will need to set the following parameters in the Setup > Outputs > Google Ads > Configuration settings dialog.

Setting Name Data Type Default Value Platform Description
Configuration Name string All The descriptive name you provide when creating the configuration. This is the name you will use when setting up the output connection to Google Ads.
Conversion ID string All The conversion ID provided in your Google Ads conversion tracking code snippet. This is only used for the legacy version of Google Ads
App Install Conversion Label string Native Apps The label provided in your Google Ads conversion tracking code snippet for app installs. This is only used for the legacy version of Google Ads

Connection Settings

When you are ready to use the Google Ads output from the data sent to mParticle, you must enter the following information in the Connections > [Web/iOS/Android/tvOS] > Connected Outputs > Google Ads dialog.

Setting Name Data Type Default Value Platform Description
Labels Custom Field All The mapping of your events to Google Ads conversion labels provided in the Google Ads conversion actions section under the ‘Set up your tracking method’ heading

Note that there are a maximum of 50 Labels allowed. This is only used for the legacy version of Google Ads
Custom Parameters Custom Field Web The mapping of your event attributes to Google Ads custom parameters as setup in the tracking template field under Campaign Advanced Settings. (Max # of Mappings Allowed: 3)

Note that there are a maximum of three (3) Custom Parameters allowed.
Link ID string iOS, Android, tvOS The unique identifier for binding a specific app to a specific developer token. If not present, we will use the legacy version of Google Ads
Remarketing Only bool False Web If enabled, the integration is set to remarketing only mode which allows you to improve your marketing campaign’s targeting.
Enable Google Site Tag bool False Web If enabled, the Google Site Tag (gtag) JavaScript tagging framework and API is used for conversion tracking.
Applies European Regulations bool False iOS, Android, tvOS If enabled, server-to-server calls will indicate that European regulations apply.
Consent Data Mapping mapping null All A mapping of mParticle consents to Google Ads consents.
Ad User Data Default Consent Value string Unspecified All The default consent value to forward for the Ad User Data field.
Ad Personalization Default Consent Value string Unspecified All The default consent value to forward for the Ad Personalization field.
Ad Storage Default Consent Value string Unspecified Web The default consent value to forward for the Ad Storage Field
Analytics Storage Default Consent Value string Unspecified Web The default consent value to forward for the Analytics Storage Field
    Last Updated: November 20, 2024