mParticle (Coming Soon)

Customer Data Platform

Coming Soon!

What is mParticle?

mParticle is a customer data platform (CDP) that helps B2C companies unify existing customer data and allows for them to connect it anywhere in order to improve marketing performance, enhance analytics, and transform the customer experience.

What Inputs Does Sprig Support?

We currently support Web and Mobile (iOS)

mParticle will forward data server to server if they detect that the Sprig kit is not included in your product. In this case, Sprig will not be able to deliver studies.

Choose from one of the supported inputs in mParticle.

mParticle Web SDK Setup

To send data from your web app to your mParticle workspace input, navigate to Setup > Inputs and select the Web platform. The web SDK only needs the API Key (not the API secret), which you’ll replace in the snippet below. Reference the guide section for information on creating inputs.

The following snippet should be included on every page of your web app. Ideally, it should be placed within the <head> tag or otherwise be loaded as soon as possible on each page

<script type"text/javascript">
    window.mParticle = {
        config: {
            isDevelopmentMode: true //switch to false (or remove) for production
        }
    };
    
    (
      function(t){window.mParticle=window.mParticle||{};window.mParticle.EventType={Unknown:0,Navigation:1,Location:2,Search:3,Transaction:4,UserContent:5,UserPreference:6,Social:7,Other:8};window.mParticle.eCommerce={Cart:{}};window.mParticle.Identity={};window.mParticle.config=window.mParticle.config||{};window.mParticle.config.rq=[];window.mParticle.config.snippetVersion=2.2;window.mParticle.ready=function(t){window.mParticle.config.rq.push(t)};var e=["endSession","logError","logBaseEvent","logEvent","logForm","logLink","logPageView","setSessionAttribute","setAppName","setAppVersion","setOptOut","setPosition","startNewSession","startTrackingLocation","stopTrackingLocation"];var o=["setCurrencyCode","logCheckout"];var i=["identify","login","logout","modify"];e.forEach(function(t){window.mParticle[t]=n(t)});o.forEach(function(t){window.mParticle.eCommerce[t]=n(t,"eCommerce")});i.forEach(function(t){window.mParticle.Identity[t]=n(t,"Identity")});function n(e,o){return function(){if(o){e=o+"."+e}var t=Array.prototype.slice.call(arguments);t.unshift(e);window.mParticle.config.rq.push(t)}}var mp=document.createElement("script");mp.type="text/javascript";mp.async=true;mp.src=("https:"==document.location.protocol?"https://jssdkcdns":"http://jssdkcdn")+".mparticle.com/js/v2/"+t+"/mparticle.js";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(mp,c)}
    )("REPLACE WITH API KEY");

When you add an input, you should be provided with a Key and Secret from mParticle:

If done correctly you should see the input listed here.

mParticle Mobile (iOS) SDK Setup

Sprig supports iOS as an input for passing events and attributes from mParticle. For full documentation, read their iOS guide

Finding your API Keys

  1. In the Sprig app, click Connect > mParticle > Get API Keys.
  2. Confirm which Environment you are in. Based on the current Environment, take note of either the Development ID or Production ID.
  3. Copy the Environment ID for use in a later step.

How to Connect Sprig & mParticle

Here's a direct link to Sprig .

Let’s start by configuring events to send to Sprig

Both your Environment ID and API Key can be found on the Sprig Connect page. If you would like to keep the same settings for development and production, you can choose to do so.

Give the configuration a name - the idea is to have two setups one for your Sprig production environment and the other for the Sprig development environment.

See above on how to find your API keys for mParticle.

Now we'll configure an audience

Give the configuration a name and then enter your API Key. Click Save when finished.

You may need to create an audience in mParticle if you have not done so already. Go to the Audience page in mParticle to create a new audience.

Can mParticle Trigger a Sprig Study?

Yes! Events sent from the mParticle SDK can in fact be used to trigger a Sprig study. For full details on events, please read more here (or see table below).

⚠️

Warning

mParticle events sent using server-to-server (mParticle firehose) cannot be used to trigger a study. These events can however be used as a study filter.

Can mParticle Events/Attributes be Used as a Sprig Filter?

For study filters you can use events that are sent through the mParticle SDK or events that are sent network to network from mParticle to Sprig.

Attributes sent from mParticle (also known as audiences in mParticle) can be used as a study filter. To learn more about attributes, read here (or see table below).