Anamap Learning : CDP

Anamap to mParticle Data Plan Connector

CDP

9/7/2024

Connector Setup

What values do I need from mParticle to connect Anamap to my Data Plan?

There are a few values that you will need to copy from your mParticle instance into the Anamap interface in order to allow the connector to communicate with mParticle and make updates to your data plan.

Value NameDescription
mParticle Client IDThis value comes from creating an API key in mParticle and is labeled as "Client ID".
mParticle Client SecretThis value comes from creating an API key in mParticle and is labeled as "Client Secret". You can only ever see this value once so make sure to copy it before closing the dialog box in mParticle.
mParticle Workspace IDThis value can also be found in the API key creation dialog. It will look like a 4 or 5 digit number.
mParticle Plan IDThis is an arbitrary value that you can set to either an existing data plan name or you can pick a new name. Anamap will handle syncing whether the plan is new or already exists.

mParticle Client ID, mParticle Client Secret, & mParticle Workspace ID

  1. First you need to find the settings gear. In the newest version of the UI (as of 8/31/2024) the settings gear is located in the lower right corner of the interface just above the mParticle logo. Hovering over the gear shows some options, you need to click on the "Platforms" link. mParticle Platforms button screenshot
  2. Once you land on the Platforms page you need to click the "API Credentials" tab heading and then click the "+ Add Credential" button. mParticle Platforms button screenshot
  3. On the first step of the Create API Credentials dialog box you'll see a few checkboxes under the "Select APIs" heading. Click "Data Plans" and set the Permissions dropdown to "Read/Write". Then click the checkbox for the mParticle workspace your data plan will live in. The number next to the workspace is the mParticle Workspace ID. Make sure to write this down as it is required for the Anamap connection settings. mParticle API Key setup screenshot
  4. Click the Save button on the first step of the dialogue to be shown your mParticle Client ID and your mParticle Client Secret. Copy both of these values and save them for your Anamap connection settings. You can only ever see the mParticle Client Secret value for your API key once so make sure to copy it before closing the dialog box in mParticle.mParticle API Key values screenshot

Where can I find the connector settings in the Anamap interface?

  1. Go to the Company Dashboard for the company you want to connect to mParticle. You can do this by making sure you've selected the company you want from the dropdown in the top navigation then clicking the "Company" link in the top navbar. One you're on the Company Dashboard you'll see a gear towards the upper right corner. Click this and it will take you to your company settings. Anamap company settings screenshot
  2. On the Company Settings screen you should see a toggle for "mParticle Data Plan Sync". Make sure this is switched into the "On" position and you will be able to see all of the textboxes where you can paste (or type) all of the values that you copied from the mParticle interface in the previous steps. Anamap to mParticle connection settings screenshot
  3. After fillout out all of the textboxes you should be able to click the "Save" button. Upon successfully saving your settings Anamap will test the connection to make sure it works and will check to see if the Plan ID you provided already exists. If the plan does not already exist Anamap will ask you if you'd like to create the plan in mParticle. Anamap to mParticle data plan does not already exists screenshot If the plan already exists your will be greeted with multiple options for how to handle an initial sync: Anamap to mParticle data plan already exists screenshot
Sync Option NameDescription
Skip, Don't SyncAnamap won't do anything. Nothing will be synced from the existing data plan into Anamap.
Import NewOnly import Events and Views that don't already exist in Anamap. All of your existing Events and Views won't be touched.
Import and OverwriteImport all Events and Views. If an Event or View already exists in Anamap then update it based on the definition in the mParticle data plan. If the Event or View doesn't exist in mParticle already then don't touch it.
Completely OverwriteDelete everything that already exists in Anamap and create everything from scratch based on the existing data plan in mParticle.

Attribute Inheritance

The Attribute Inheritance checkbox that is visible in the settings allows you to create Events that only contain attributes/properties that are specific to that Event but when generating the data plan for mParticle will ensure the validation for the Events also pulls in all of the View level attributes for the Views where that Event is present. This setting allows you to keep your data schema in Anamap cleaner so your only need to worry about managing the attributes for that Event but you get the benefit of being able to pass down any View attributes to the Event at the time of data plan creation.

Imagine you had an Event call "Subscribe to Newsletter". The Event itself might only need to contain attributes related to which newsletter the user subscribed to or whether they opted into other marketing. However, the Event takes place on a specific View (or multiple) so you would likely also want to pass in the URL, the page name, the domain, etc so the Event gets the full context for analysis. In Anamap you can maintain the list of attributes for the Event and View separately but have them merged where you really need it.

Sync From mParticle Button

This button opens the dialog that you see after saving the connection settings for the first time, it allows you to initiate a sync from an existing mParticle data plan into Anamap.

Download Data Plan Button

This button will generate a .json file that contains the definition for the data plan based on your Anamap data schema. This file can be imported directly into mParticle using their data plan wizard or you can save it for version control.

The On/Off Toggle

If you need to disable the sync between Anamap and mParticle you can click the toggle on the Company Settings page. All of your API connection strings will be saved for when you enable the connector again but saving Attributes, Events, and Views will not send updates to mParticle.

How do I setup my Anamap data schema to work with mParticle's Data Plan?

There are two primary tracking methodologies for naming Events in mParticle. The most common method is to uniquely name all of your Events. This makes translating your Anamap data schema into an mParticle data plan very straightforward. The second method is to utilize generic Events like a single generic page view event or a single generic click event where the attributes for both are what your company uses to differentiate them in your analytics.

Unique Events

By default Anamap will use the name of your Event or View and use that in the data plan. If you have an Event and Attribute Inheritance is enabled the data plan for that Event will contain all of the attributes for the unique named Views that Event appears on.

Generic Events

If your company is utilizing a generic event schema you may need to do a bit more work in order to correctly generate a useful data plan in mParticle. If you create multiple Events in Anamap such as "Hero Image Click" and "CTA Click" but you're really tracking both under the event name of "Click" in mParticle you can use a special attribute to tell Anamap that when it's building the data plan it should ignore the name visible in Anamap and instead lump both of these Events into a single Event in the data plan called "Click". The same can be done for Views; in Anamap you likely want to name your views specific names so they are easier to understand in the Map but you want all of them to role up into an screen view event called "Pageview".

First you'll need to add mp_screen_name and mp_event_name as Attributes in Anamap. After that you'll need to attach them to the Events or Views that need to be merged together. We recommend you set these attributes to "Not Exposed" on your Events and Views so they don't confuse the average stakeholder in your organization. The value for these Attributes once they are attached to an Event or View should just be whatever the generic (or merged) name for the event or screen view should be. Anamap to mParticle generic event and view name attributes screenshot

Publishing An Updated Data Plan

All of the changes you make in Anamap will impact your in-development data plan. Once you're ready to push the changes to your analytics into production (on your website or elsewhere) you can use the "Publish Plan to Prod" button in the mParticle CDP module in your Company Dashboard to publish your current data plan version and create a new in-development version. Anamap to mParticle generic event and view name attributes screenshot The mParticle CDP module also provides you with some convenient information and link directly to your data plan in mParticle.

Notes

  • By default Anamap will always try to make changes to a data plan that is only in the "Development" environment. If there isn't one available Anamap will create a new version of the data plan to make changes.
  • To save you storage space on your data plans Anamap will only keep 3 versions of the same data plan live. If you have multiple old versions live these will be set back to the "Draft" environment. As you publish new versions of the data plan from the Anamap interface it will always make sure the correct number of versions are live at any given time.