This article will help you:
|
NOTE: This feature is only available for organizations who have purchased the Govern Add-on (formerly known as Taxonomy).
Planning your events and properties gives structure to your analytics projects. By telling Amplitude in advance what event types, event properties, and user properties it can expect to receive for this project, you're laying the groundwork for an organized project that can scale up easily, with far fewer data management headaches than you'd have if you opted not to plan. Pair your planned data structure with data validation and schema settings to automatically reject any unplanned, unexpected events from being logged to your Amplitude project.
Plan events and properties
Before you can plan your data, you'll have to initialize your Schema. To begin planning your events and properties, follow these steps:
- From anywhere within the Govern panel, click + Plan Data.
- First, you'll plan events and event properties. Click + Add Event to add a new event to your schema. Enter a name and description for your event.
- To add a property for this planned event, click + Add Property. Enter a name and description, and set the data type by clicking Any and choosing the appropriate type from the list.
- Repeat steps 2 and 3 until all your events and event properties have been added. Then click Save.
NOTE: You can also add new properties to existing events, under Plan with an existing event. - Click Next > to advance to user properties.
- To plan a user property, click + Add Property. Enter a name and description, and set the data type by clicking Any and choosing the appropriate type from the list. Repeat this step until you've added all the user properties you need. Then click Save.
NOTE: You can edit the name, description, and data type of an existing user property—as well as delete it—under Plan with an existing user property. - Click Next > to advance to the preview summary.
- Here you'll see a list of all the events and properties you've added or edited to your schema. Review it to make sure it's right. If it is, click Save Changes.
Set or change a property's data type
The Schema introduces type checking for event and user property values. This means Amplitude can detect when event data comes in that does not match the specified type. You can set and edit the data type of an event or user property — for example, from a string to a Boolean. This can be useful as your data and analysis needs shift and expand over time.
To edit the data type of a user property, follow these steps:
- Navigate to Govern > Plan Data > Plan Events & Event Properties OR Plan User Properties.
- Find the property whose data type you want to change and select a data type from the dropdown menu to its left.
- Select the property's new data type and add any required specifications.
The following are the available data types:
- Any: Any value
- Boolean: Values representing boolean states ("true", "false", "yes", "no", "0" and "1")
- Number: Numerical values (e.g. 12345)
- String: A string value
- One of..: One of a set of possible values. Also known as an enumerable. (e.g. property fruit is one of [apple, banana, strawberry])
- Regular Expression: Custom regex that can be used for pattern matching or more complex values. (e.g. property zip code must have pattern [0-9]{5} )