Data plans allow you to describe the type and format of the data you expect to collect in your app. mParticle compares incoming data to a data plan, preventing any data that does not match the plan from being stored in your account or forwarded to your outputs.
You can create multiple data plans in each workspace of your account, and each plan can have multiple versions.
Data plans are created from two main elements:
Use the following steps to create a basic data plan using a template in the mParticle UI. More complex data plans can be created using the Data Plan Builder or the Data Planning API if the templates provided in the UI are insufficient for your app.
Data plans can be created from templates in the mParticle UI, they can be created using the Data Plan Builder, or they can be created by importing actual event data collected from your app.
For this tutorial, you can use the sample data plan that has been built for the Higgs Shop specifically. The steps below explain where to find the sample data plan, how to upload it to your mParticle account, activate it, and then make sure that data from your instance of the sample app is being validated against the plan.
/mparticle-web-sample-apps/core-sdk-samples/higgs-shop-sample-app/dataplans/higgs_shop_basic_data_plan_1.jsonin the directory where you cloned the sample app repo.
Plan Idwhich you will need later.
You will be taken to a detailed view of your new data plan where you can see a list of the events you should expect to track in The Higgs Shop.
Displayed on this page are each event category, the event name, and a description. Events that include additional attributes can be expanded by clicking the + icon next to the event category.
HiggsShopSampleApplication.kt. This is the same file we use to initialize the mParticle SDK.
MParticleOptionsobject, include the data plan ID and version with:
your_plan_namewith your Plan Id referenced earlier when creating a data plan.
planVersionis set to the correct version of your plan. If you kept the default settings in step 7.1, this should be
Learn more about data plans and data validation in Data Planning.
Was this page helpful?