diff --git a/pages/_meta.json b/pages/_meta.json index 4d6bd08b13..1be9897724 100644 --- a/pages/_meta.json +++ b/pages/_meta.json @@ -3,11 +3,6 @@ "title": "Docs", "type": "page" }, - "tutorials": { - "title": "Tutorials", - "type": "page", - "display": "hidden" - }, "changelogs": { "title": "Changelog", "type": "page", diff --git a/pages/docs/_meta.json b/pages/docs/_meta.json index 3bb58f6228..c06ad1a466 100644 --- a/pages/docs/_meta.json +++ b/pages/docs/_meta.json @@ -3,5 +3,6 @@ "tracking": "Tracking", "analysis": "Analysis", "admin": "Admin", + "tutorials": "Tutorials", "other-bits": "Other Bits" } diff --git a/pages/docs/tutorials/_meta.json b/pages/docs/tutorials/_meta.json new file mode 100644 index 0000000000..c3817e95fa --- /dev/null +++ b/pages/docs/tutorials/_meta.json @@ -0,0 +1,8 @@ +{ + "setting-up-mixpanel": "Setting Up Mixpanel", + "analytics-strategy": "Analytics Strategy", + "creating-a-tracking-plan": "Creating a Tracking Plan", + "mixpanel-analysis": "How to use Mixpanel", + "developers": "Mixpanel for Developers", + "migration-guides": "Migration Guides" +} diff --git a/pages/docs/tutorials/analytics-strategy.md b/pages/docs/tutorials/analytics-strategy.md new file mode 100644 index 0000000000..bb2099e4ef --- /dev/null +++ b/pages/docs/tutorials/analytics-strategy.md @@ -0,0 +1,2 @@ +## Overview +Defining the right metrics to track product performance can be a challenging task for any business. Companies have different goals and unique products that require a customized approach to analytics. To help you define your metrics, we have crafted a framework that outlines the types of metrics, how to organize them, and the key categories to consider. In [How to Determine Your Goals And Metrics guide](https://help.mixpanel.com/hc/en-us/articles/360035109991), we will explore the focus metric, Level 1 and Level 2 metrics, and how to organize them to ensure each team understands how their metrics contribute to the overall product performance. diff --git a/pages/docs/tutorials/creating-a-tracking-plan.md b/pages/docs/tutorials/creating-a-tracking-plan.md new file mode 100644 index 0000000000..f11c2b151e --- /dev/null +++ b/pages/docs/tutorials/creating-a-tracking-plan.md @@ -0,0 +1,33 @@ +## Creating a Tracking Plan + +### Utilise a Tracking Plan to Tie Key Goals to Events Tracked +Mixpanel recommends creating a tracking plan based on the key business goals identified from your analytics strategy. It should: + +- Be a centralized document that should serve as the source of truth on your Mixpanel implementation +- Define your business goals / KPIs and analytics strategy metrics +- Outline the events, event properties, and user profile properties aligned to your metrics +- Be treated as a living and shared document that is continuously updated with any implementation changes +- Include notes that are referenced across teams (product, marketing, data science, tech / dev teams, etc.) + +This will be important for team members who are involved in defining use cases to be implemented in Mixpanel as well as, tech teams involved in the actual implementation of the codes. + +### Tracking Plan Methodology +Be intentional with your data. Prioritize the most critical data you'll need based on your analytics strategy and KPIs, then iterate. Tracking everything and anything your user can do in your product can lead to unnecessary development effort and unused data. + +#### Define and prioritize KPIs +Define the top KPIs and metrics that will help measure success and inform decisions about your product. + +#### Map KPIs to User Flows +Map each KPI / metric to the steps or actions that users take to influence each KPI / metric. For example, sign up flow will be important when measuring KPIs related to new user acquisition. Consider also the different paths that users can take to achieve the same outcomes. + +#### Translate Flows into Events / Properties +Breakdown your user flows into events (actions) and properties (context of these actions) in your tracking plan. This will ensure that you have scoped out the data you need to achieve your KPIs / metrics in Mixpanel. + +Mixpanel provides the following templates for vertical-specific tracking plans: + +- [Retail and E-commerce](https://docs.google.com/spreadsheets/d/1Kyys37m_GEL79_1BKKEnU5KxK91NF04kY-L_bFfcfqE/edit#gid=1484002407) +- [Media and Entertainment](https://docs.google.com/spreadsheets/d/1K9t53kJJjaBG36kCIbZn_qKjXR9Iy306zYZAqDrv_AM/edit?usp=sharing) +- [SaaS](https://docs.google.com/spreadsheets/d/1A5wm5MKzRfSOZfUfCAg8YpePiz8Jn3Ar_u8KBo5lD6g/edit?usp=sharing) +- [Financial Services](https://docs.google.com/spreadsheets/d/1oGv6vbIFiYbima9IX4ItpBJvuChs-zzh83MRt_dSPgg/edit?usp=sharing) + +You can also access a copy of a [blank Tracking Plan from here](https://docs.google.com/spreadsheets/d/1ZdOZ6TMtRPxy7qRxiLsvH9HWcHJM6nZydWKoThRxFKc/edit#gid=1641519238). Save a copy to your device to get started on your tracking plan. diff --git a/pages/docs/tutorials/developers/_meta.json b/pages/docs/tutorials/developers/_meta.json new file mode 100644 index 0000000000..1cf0ac2d00 --- /dev/null +++ b/pages/docs/tutorials/developers/_meta.json @@ -0,0 +1,5 @@ +{ + "mixpanel-for-developers-fundamentals": "Fundamentals", + "mixpanel-for-developers-implementation": "Implementation", + "mixpanel-for-developers-id-management": "Identity Management" +} diff --git a/pages/docs/tutorials/developers/mixpanel-for-developers-fundamentals.mdx b/pages/docs/tutorials/developers/mixpanel-for-developers-fundamentals.mdx new file mode 100644 index 0000000000..dad004a8ac --- /dev/null +++ b/pages/docs/tutorials/developers/mixpanel-for-developers-fundamentals.mdx @@ -0,0 +1,74 @@ +## Tutorial Overview +We've broken down the Mixpanel for Developers tutorial into a couple of different modules designed to help you understand events and properties in Mixpanel, understand the data types it supports and how to send events to Mixpanel and enrich user data that have been documented in your Tracking Plan. + +We will also explore Mixpanel’s ID management Solution for Product Managers and Analysts to identify visitors as they go from an anonymous state to a known state and even when visitors use different devices. + +## Mixpanel Data Model +Mixpanel data is stored and isolated within a project. Mixpanel recommends tracking 1 product with multiple platforms (mobile, web, etc.) into one project, but create [separate projects for development and production](https://help.mixpanel.com/hc/en-us/articles/360001354886-Automatically-Separate-Development-Data). + +There may be [other factors where implementing separate projects](https://help.mixpanel.com/hc/en-us/articles/115004491683-When-To-Use-Multiple-Projects#factors-to-consider) is required, but do note that querying data across projects is not possible. Mixpanel supports a few different categories of data that can be used for analysis: events, user profiles, group profiles, and lookup tables. In data warehouse terminology, events make up the fact table while user profiles, group profiles, and lookup tables are dimension tables. + +
+ +
+ +### Property Types +Properties are attributes that help you define the specifics of an **Event** or a **User.** +Mixpanel has many Properties defined in its Data Model. + +|Property Type|Description| +|:--- |:---| +|[Event Properties](https://help.mixpanel.com/hc/en-us/articles/360001355266)|Event Properties describes the events that are tracked within your product.| +|[Super Properties](https://help.mixpanel.com/hc/en-us/articles/360001355266#super-properties-for-events)|Super Properties are a type of Event Property that you can initialise to automatically attach to every subsequent Event you’re tracking at client side.| +|[User Profile Properties](https://help.mixpanel.com/hc/en-us/articles/115004708186)|User Profile Properties describe your users (they typically store current demographical information). User profiles are joined to events on `event.distinct_id = user_profile.distinct_id`.| +|[Group Profile Properties](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics#group-profiles)|Group Profile Properties describe group level information (similar to User Profiles Properties at user level). With Mixpanel’s [Group Analytics](https://help.mixpanel.com/hc/en-us/articles/360025333632), multiple users can be grouped and behavioural data analysed at a customised group level (such as company, account). Group profiles are joined to events on your chosen group key. For example, if you create a new group key for `company_id` your events will be joined on `event.company_id = group_profile.company_id`.| +|[Lookup Tables](https://help.mixpanel.com/hc/en-us/articles/360044139291-Lookup-tables)|Lookup Tables allow you to dynamically extend additional properties mapped to an exiting Event or User Property. For example, if you create a lookup table for "Songs" (with additional properties like `hash_tags`, `top_10`, `all_time_favorite`) and specify the mapped event property as `song_id`; you can use these additional properties when doing filtering or breakdowns for events that has `song_id` as an event property.| +|[Default Properties](https://help.mixpanel.com/hc/en-us/articles/115004613766-What-properties-do-Mixpanel-s-libraries-store-by-default-)|Default Properties (for Events and User Profiles) are collected and populated with values automatically in Mixpanel. This can happen upon data ingestion or when using certain Mixpanel client-side SDKs. Typically, they have a dollar sign ($) or “mp_” as prefix to distinguish them from normal properties.| +|Reserved Properties|Mixpanel reserves certain property names (for [Events](https://help.mixpanel.com/hc/en-us/articles/360001355266#reserved-properties-for-events) and [User Profiles](https://help.mixpanel.com/hc/en-us/articles/115004708186#reserved-properties-for-user-profiles)) for special use cases, and these may or may not be automatically populated with values. The purpose of such Reserved Properties are for processing (ie event time stamping) or for specific system features (eg: cohort exports). Examples: `time`, `$email`, `$phone`, `$name`, `$created`.| + +### Supported Data Types +Mixpanel supports five [data types](https://help.mixpanel.com/hc/en-us/articles/115004547063) for properties: String, Numeric, Boolean, Date and List. By choosing the most suitable data type for your properties, you'd be able to apply a set of [operators](https://help.mixpanel.com/hc/en-us/articles/115004547063#data-type-operators) that are most relevant to your properties in Mixpanel reports, and this will give you richer insights about your data. + +**String** +- Alphanumeric value e.g. Plan Type = "Free", Artist Name = "Bruno Mars" +- String properties have a character limit of 255 bytes. +- Mixpanel will treat any property value that doesn’t match any other data type as a String. + +**Numeric** +- Numeric (integer or decimal) value e.g. Cost = 15.00, Quantity = 5 +- You can apply operators such as sum, median and percentile on numeric properties. + +**Boolean** +- Mixpanel treats properties as boolean if the value is either the JSON constant `true` or `false` e.g. Favorited = true, Bookmarked = false. +- On Mixpanel, you can typecast any non-boolean property to boolean, +- "false", 0, null, undefined, and empty string will be typecasted to boolean `false` +- "true" and any set value that is not 0 or empty string will be typecasted to boolean `true` + +**Date** +- An ISO formatted date `YYYY-MM-DDTHH:MM:SS` in UTC e.g. Last Purchase = "2022-10-30T13:30:25", Last Login = "2022-10-29". Note that all timestamps need to be sent in UTC timezone in an ISO format. +- Mixpanel treats unix timestamps as Numeric property, however, you can typecast it to Date data type. + +**List** +- A list of values as a JSON array e.g Favourite Genres = ["Folk","Alternative"] or Favourite Numbers = [1,5,10.0] +- Limits of a List property: Event Property = 8KB, User Profile Property = 256KB, Each item in the list: 255 bytes + +## Updating User Profile Properties +Mixpanel user profile properties are mutable and they can be updated in a timely manner to reflect the latest state of the users. + +You can update user profile properties via [Mixpanel SDK](https://developer.mixpanel.com/docs/javascript#setting-profile-properties) or [Engage API](https://developer.mixpanel.com/reference/profile-set). The following are the operations supported in Mixpanel. + +**Setting profile property** +- `$set` - Sets a profile property or update a profile property value. +- `$set_once` - Sets a profile property only if they do not yet exist on Mixpanel. This ensures that the previous profile property value is not overwritten. + +**Updating numeric profile property** +- `$add` - Increments or decrements a numeric profile property. + +**Updating list profile property** +- `$union` - Merges a given list into a List profile property and it ensures there are no duplicate values in the profile property. +- `$append` - Appends a value to the end of a List profile property. +- `$remove` - Removes a value from a List profile property. + +**Removing profile properties** +- `$unset` - Remove a profile property from the user profile +- `$delete` - Remove all profile properties from the user profile. diff --git a/pages/docs/tutorials/developers/mixpanel-for-developers-id-management.mdx b/pages/docs/tutorials/developers/mixpanel-for-developers-id-management.mdx new file mode 100644 index 0000000000..fb69b1e008 --- /dev/null +++ b/pages/docs/tutorials/developers/mixpanel-for-developers-id-management.mdx @@ -0,0 +1,51 @@ +## Overview + +This section provides details on implementing Mixpanel's Identity Management called Identity Merge (ID Merge for short). Note that the [Legacy Identity Management](https://help.mixpanel.com/hc/en-us/articles/115004497803-Identity-Management-Pre-Identity-Merge-Overview) is not covered in this section as Identity Merge is enabled by default for all new organizations since March 2020. + ++ +
+ +## Basic Concepts in ID Merge ++ +
+ +## ID Merge Implementation (using Client-side SDK) ++ +
+ +## ID Merge Implementation Best Practices +#### Call mixpanel.identify upon a successful sign-up / login or when an app is re-opened in a logged in state +By calling mixpanel.identify at these specific points in user journeys, you would be able to link the pre and post-login events to the same user on Mixpanel. Besides, calling mixpanel.identify when the users re-open the app in a logged in state ensures that all events in the session are tracked with the user's identifier such as user id. + +#### Track the unique identifier as a super property and user property to assist troubleshooting +You can track the user's unique identifier as a [super property via mixpanel.register](https://developer.mixpanel.com/docs/javascript#super-properties) and [user property via mixpanel.people.set](https://developer.mixpanel.com/docs/javascript#setting-profile-properties) as soon as it is available in the app i.e. on a successful sign-up / login or when an app is re-opened in a logged in state. +In the cases when ID Merge is not implemented properly, you can rely on these properties for troubleshooting purpose. + +#### Avoid creating profiles for anonymous users +Avoid creating profiles for anonymous users. If possible, cache user profile properties updates in cookie or local storage and only send them to Mixpanel after the user is identified (ie logged-in state). + +#### QA your ID management implementation during development phase +Here are a few things to look out for: +- Ensure that cross-platform, pre and post-registration events are linked to the same user on Mixpanel. +- Ensure that no duplicate profiles are created as the users go through the onboarding, registration, login and cross-platform user journey. +- Ensure that all the user’s identifiers are stored in the same Identity Cluster and all their events are displayed on a single profile on Mixpanel. + +#### Keep a record of your ID management implementation +We encourage you to document your implementation (or create a diagram of the implementation). This will come in handy when you need to re-implement this on a new platform or troubleshoot ID management issue. + +Read more about [ID Merge Implementation Best Practices](https://help.mixpanel.com/hc/en-us/articles/9648680824852) + +--- + +## FAQs +#### Is ID Merge retroactive? +Yes, ID Merge is retroactive. During merging distinct IDs that are added to the same cluster will be considered as the same user going forward. + +#### There are two types of ID Merge? +Yes, you can read more about the [difference between Original vs Simplified ID Merge](https://help.mixpanel.com/hc/en-us/articles/14383975110292) and for more details how each one works, see the links below: +- [Getting Started with Original ID Merge](https://help.mixpanel.com/hc/en-us/articles/360041039771) (default for new projects) +- [Getting Started with Simplified ID Merge](https://help.mixpanel.com/hc/en-us/articles/14377628688788) + diff --git a/pages/docs/tutorials/developers/mixpanel-for-developers-implementation.mdx b/pages/docs/tutorials/developers/mixpanel-for-developers-implementation.mdx new file mode 100644 index 0000000000..8c35fd20a1 --- /dev/null +++ b/pages/docs/tutorials/developers/mixpanel-for-developers-implementation.mdx @@ -0,0 +1,50 @@ +## Implement via the Mixpanel SDK + +In this section, we will be going through an example of an event in your Tracking Plan to show how a developer can implement that event using Mixpanel’s Javascript SDK. We’ll also look at how you can update your user profiles. + ++ +
+ +### Initialise Mixpanel's SDK ++ +
+ +### Initializing Super Properties and Tracking an Event ++ +
+ +### Setting User Profile Properties ++ +
+ +## Other Ingestion methods + +Apart from Mixpanel SDKs, there are also [other ways](https://docs-git-tutorials-for-cs-mixpanel.vercel.app/docs/getting-started/plan-your-implementation#already-collect-data-with-a-cdp-or-in-house-tools) to send data into Mixpanel. + ++ +
+ +--- + +## FAQs + +#### What are the different SDKs available by Mixpanel? +- Supported client-side libraries: [JavaScript](https://developer.mixpanel.com/docs/javascript), [iOS - Objective-C](https://developer.mixpanel.com/docs/ios), [iOS - Swift](https://developer.mixpanel.com/docs/swift), [Android](https://developer.mixpanel.com/docs/android), [React Native](https://developer.mixpanel.com/docs/react-native), [Flutter](https://developer.mixpanel.com/docs/flutter), [Unity](https://developer.mixpanel.com/docs/unity) +- Supported server-side libraries: [Python](https://developer.mixpanel.com/docs/python), [Java](https://developer.mixpanel.com/docs/java), [PHP](https://developer.mixpanel.com/docs/php), [Ruby](https://developer.mixpanel.com/docs/ruby), [NodeJS](https://developer.mixpanel.com/docs/nodejs) +- [REST HTTP API](https://developer.mixpanel.com/reference/ingestion-api) + +#### Browser Cookies are unreliable, is there another way? +You can switch from cookie to local storage. You can read more about it [our article](https://help.mixpanel.com/hc/en-us/articles/115004546863#switch-from-cookies-to-localstorage). + +#### What’s the difference between time, \$mp_api_timestamp_ms, and mp_processing_time_ms? +- `time` or `$time` - actual time of the event (which could be from days in the past), typically set when mixpanel.track() is called in the SDKs or filled in directly as part of a API payload. +- `$mp_api_timestamp_ms` - the timestamp when the data is received by our ingestion api. +- `mp_processing_time_ms` - the timestamp when the data is processed and ready for queries. + +#### How to handle Date of Birth before 1/1/1970? +While the timestamp values are recommended to send in the ISO format, for dates before 1st January 1970, you can send the value like “YYYY-MM-DD”. diff --git a/pages/docs/tutorials/migration-guides/_meta.json b/pages/docs/tutorials/migration-guides/_meta.json new file mode 100644 index 0000000000..37c49cd871 --- /dev/null +++ b/pages/docs/tutorials/migration-guides/_meta.json @@ -0,0 +1,4 @@ +{ + "migrating-to-mixpanel-from-amplitude": "Migrating from Amplitude", + "migrating-to-mixpanel-from-google-analytics": "Migrating from Google Analytics" +} diff --git a/pages/docs/tutorials/migration-guides/migrating-to-mixpanel-from-amplitude.md b/pages/docs/tutorials/migration-guides/migrating-to-mixpanel-from-amplitude.md new file mode 100644 index 0000000000..05eadc2e2b --- /dev/null +++ b/pages/docs/tutorials/migration-guides/migrating-to-mixpanel-from-amplitude.md @@ -0,0 +1,300 @@ +# Migrating to Mixpanel from Amplitude + +If you’re reading this, congrats on considering making the switch from Amplitude to Mixpanel 🎊 This guide is intended to outline how the migration works, what to expect, and how to mitigate the risks and switching costs of a migration whilst accelerate time to value. + +## What a migration will solve ✅ + +- Cut-over sending live data to Mixpanel and stop sending to Amplitude +- Historical backfill of existing data +- Integrates easily with existing event data collection methods - SDKs, CDPs, DWH, RETL +- Migrates all existing/new data in entirety - full access to all events and properties you had in Amplitude + +## What a migration won’t solve ⛔ + +- Existing issues with data trust/quality or data governance → As part of the migration, we recommend a [data audit](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da) as the first step to only transfer your valuable data and clean up trust/quality issues +- Reporting, Dashboards, and Saved Entities → As part of the migration, we can review your top used reports and dashboards then [sit down with each team](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da) to re-build them in Mixpanel + +## What level of effort does the migration take? ⚖️ + +A migration primarily consists of 3 phases: + +1. Technical migration of data → Data audit, Live data cutover, Historical data import +2. Change management migration of end users → Champion identification, User interviews, Team by team specific trainings, Ensuring adoption for each team +3. Ongoing success planning → Improving data governance, Optimizing analysis, Building a product analytics practice + +From a technical perspective, the migration process is relatively straightforward. If you have an engineer with access to your data and the ability to write code/transforms to send data to new destinations, this can be done in a single sprint (1-2 weeks). + +From an end user perspective, Mixpanel is simpler and easier to learn than Amplitude but there of course will be a learning curve. The largest hurdle is copying over key saved reports, dashboards, etc. which the team is familiar with in Amplitude and teaching them how to rebuild these in Mixpanel. We recommend doing this process in detail for each team, showing them how to recreate key analyses side-by-side in Mixpanel. You can then leverage your team champions to force multiply your adoption efforts. + +When going through this migration, there is no better time to audit your own data and reports to only migrate what matters. Most data and reporting is stale after some time anyways, prioritize the data and reports your team uses every day for their Top 10 key questions. These can be easily copied over and Mixpanel also provides Customer Success resources during Onboarding to assist with this. + +## Getting started: Identify your implementation method 🚦 + +Mixpanel accepts event data from a variety of different sources. Choose your implementation method first and then you can follow the below steps for sending data to Mixpanel. + +We support the following data collection mechanisms: + +- Client-side SDKs & Server-side SDKs: Simply replace Amplitude code calls to track events with Mixpanel calls instead + + Fortunately, Mixpanel and Amplitude’s client side SDKs have *very similar* developer facing APIs. This makes it fairly easy to “find and replace” embedded Amplitude calls and swap them for Mixpanel calls. + + This section will detail the Javascript SDKs (for the sake of brevity), although both analytics platforms have fairly uniform tracking APIs for other SDKs (mobile, server-side). + + Amplitude JS Docs: [https://amplitude.github.io/Amplitude-JavaScript/](https://amplitude.github.io/Amplitude-JavaScript/) + + Mixpanel JS Docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference](https://developer.mixpanel.com/docs/javascript-full-api-reference) + + ## Installing the Mixpanel SDK: + + [https://developer.mixpanel.com/docs/javascript-quickstart#1-initialize-the-library](https://developer.mixpanel.com/docs/javascript-quickstart#1-initialize-the-library) + + # Migrating Amplitude ⇒ Mixpanel + + ### Initialization + + Amplitude’s `init()` method: + + ```jsx + var amplitudeClient = new AmplitudeClient(); + amplitudeClient.init('API_KEY') + ``` + + Mixpanel’s `init()` method: + + ```jsx + mixpanel.init('new token') + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelinit](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelinit) + + init options: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_config](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_config) + + ### Events + + Amplitude’s `logEvent()` method: + + ```jsx + amplitudeClient.logEvent('Clicked Button', {'finished_flow': false }); + ``` + + Mixpanel’s `track()` method: + + ```jsx + mixpanel.track('Clicked Button', {'finished_flow': false }) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpaneltrack](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpaneltrack) + + ### Identity Management + + Amplitude’s `setUserId()` method: + + ```jsx + amplitudeClient.setUserId('joe@gmail.com'); + ``` + + Mixpanel’s `identify()` method: + + ```jsx + mixpanel.identify('joe@gmail.com') + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelidentify](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelidentify) + + ### User Properties + + Amplitude’s `setUserProperties()` method: + + ```jsx + amplitudeClient.setUserProperties({'gender': 'female', 'sign_up_complete': true}) + ``` + + Mixpanel’s `people.set()` method: + + ```jsx + mixpanel.people.set({'gender': 'female', 'sign_up_complete': true}) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelpeople](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelpeople) + + notes: `identify()` should be called at some point in the user’s session to propagate people methods + + ### Group Analytics + + Amplitude’s `setGroup()` method: + + ```jsx + amplitudeClient.setGroup('orgId', 15); + ``` + + Mixpanel’s `set_group()` method: + + ```jsx + mixpanel.set_group('orgId', 15) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_group](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_group) + +- Customer Data Platforms (CDPs) like [Segment](https://segment.com/): Go into your CDP settings to add Mixpanel as a destination, and point your data stream to Mixpanel + + Since CDPs already collect all your data via 1 SDK and route to many downstream destinations, enabling Mixpanel is straightforward. Simply go to your CDP settings and add Mixpanel as a destination: + +  + + + Once you set up the connection to Mixpanel, you can proceed with configuring key settings like: + + - which events and properties to send → only send what matters + - edit any mappings/editing/filtering that has to be done on the data → ensure high data quality and governance + - connection settings, or CDP specific settings for data syncs → control over how data is sent + + We provide Mixpanel as a destination and setup guides for all of the most popular CDPs: + + - [Segment](https://segment.com/docs/connections/destinations/catalog/actions-mixpanel/) + - [mParticle](https://docs.mparticle.com/integrations/mixpanel/audience/) + - [Rudderstack](https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/) + +- [Import API](https://developer.mixpanel.com/reference/import-events): Point your event ingestion pipeline to [Mixpanel’s robust API](https://developer.mixpanel.com/reference/import-events) for data ingestion + + If you currently send data to Amplitude directly to their API, you can simply swap out the Amplitude API with the Mixpanel API. + + ### Sending Events + + Amplitude’s `/track` API Endpoint is `[https://api2.amplitude.com/2/httpapi](https://api2.amplitude.com/2/httpapi)` (documented [here](https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/)). A sample request from your server for this API would look like: + + ```bash + curl -X POST https://api2.amplitude.com/2/httpapi \ + -H 'Content-Type: application/json' \ + -H 'Accept: */*' \ + --data '{ + "api_key": "YOUR_API_KEY", + "events": [{ + "user_id": "203201202", + "device_id": "C8F9E604-F01A-4BD9-95C6-8E5357DF265D", + "event_type": "watch_tutorial" + }] + }' + ``` + + Mixpanel’s `/track` API endpoint is [`https://api.mixpanel.com/import`](https://api.mixpanel.com/import) (documented [here](https://developer.mixpanel.com/reference/import-events)). A sample request from your server for this API would look like: + + ```bash + curl --request POST \ + --url 'https://api.mixpanel.com/import?strict=1&project_id=%3CYOUR_PROJECT_ID%3E' \ + --header 'Content-Encoding: gzip' \ + --header 'Content-Type: application/json' \ + --header 'accept: application/json' \ + --header 'authorization: Basic cnlhbjpyeWFu' \ + --data ' + [ + { + "event": "string", + "properties": { + "time": 0, + "distinct_id": "string", + "$insert_id": "string" + } + } + ] + ' + ``` + + The big difference between the APIs are: + + - **Authentication:** Amplitude authenticates in the request payload, whereas Mixpanel uses your project token in the request URL alongside basic auth. Mixpanel authentication can be done via a service account as described [here](https://developer.mixpanel.com/reference/ingestion-api-authentication). Be sure to move the authentication outside the payload. + - **Event JSON Structure:** Amplitude and Mixpanel have slightly different structures (explained further below). You will want to remap the Amplitude event format to the expected Mixpanel JSON payload as described [here](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da). + +- [Reverse ETL](https://mixpanel.com/blog/what-is-reverse-etl-product-data/) (RETL) tools like [Census](https://getcensus.com): Go into your RETL settings to add Mixpanel as a destination, and point your syncs to Mixpanel + + If you already send data to Amplitude with your data warehouse as the source of truth using reverse ETL, sending data to Mixpanel requires adding a new destination and syncing the same models you have been syncing to Amplitude. This option is like a hybrid between the CDP and Import API options above - you can use the reverse ETL tool to set Mixpanel up simply as a destination and then the tool will handle all of the remapping at the API level for you. + + Simply go to your RETL settings and add Mixpanel as a connection: + +  + + + We provide Mixpanel as a destination and setup guides for all of the most popular RETL tools: + + - [Census](https://docs.getcensus.com/destinations/mixpanel) + - [Hightouch](https://hightouch.com/docs/destinations/mixpanel) + - [Segment](https://segment.com/docs/connections/reverse-etl/) + + +## Differences in the data models ☯️ + +Both Mixpanel and Amplitude are product analytics tools which collect event-based behavioral data about your users. [Events](https://developer.mixpanel.com/reference/import-events) are commonly expressed as JSON which represent the name of the user action, the ID of the user, the time at which the action took place, and all associated metadata. Events are immutable, and represent data at the time of which an action takes place. + +```json +{ + "event": "Signup", + "properties": + { + "time": 1618716477000, + "distinct_id": "91304156-cafc-4673-a237-623d1129c801", + "$insert_id": "29fc2962-6d9c-455d-95ad-95b84f09b9e4", + "Referred by": "Friend", + "URL": "mixpanel.com/signup" + } +} +``` + +In addition to events, Mixpanel supports an additional type of data that Amplitude does not. This data is known as [user profiles](https://developer.mixpanel.com/reference/profile-set), which represents dimensional data that is always updated to the most recent value for a user. User data allows you to segment your reporting by both historical point-in-time data as well as real-time dimensional data about your users. + +```json +{ + "$distinct_id": "13793", + "$set": + { + "name": "Robert" + } +} +``` + +We also support additional data for extending your use cases with Mixpanel: + +- [Group profiles](https://developer.mixpanel.com/reference/group-set-property): Used with our Group Analytics product add-on to allow you to pivot quickly between users and other entities in your analysis. A common use case is for a B2B company to pivot between analyzing users and analyzing accounts. +- [Lookup tables](https://developer.mixpanel.com/reference/lookup-tables): For event data which was already sent, you can use these to extend the data already sent into Mixpanel. A common use case is taking an identifier like a transaction ID, item ID, etc. and using lookup tables to enrich the data with additional information like the amount, category, etc. from your data warehouse. + +## Data audit: Cleaning up the mess 🧹 + +We’ve found from experience that <20% of the data in a product analytics tool is used for 80%+ of the queries. This is especially true the longer you have been using a tool - over time teams add more and more tracking for new events and properties, and without strong data governance practices, you will inevitably have some messy data in Amplitude. + +In the spirit of making sense of the mess, it is not recommended that you bring all historical data in from Amplitude. A common practice is to leverage Amplitude’s [Data](http://data.amplitude.com) Product to first understand which events and properties are queried by your users. No queries in the past 30 days? These events and properties have probably gone stale - there is low value and high effort in brining them to Mixpanel, so cut them from your import and do not migrate the existing tracking. + +After you’ve gotten rid of the obvious (the events and properties no one uses), you can fine tune this approach by doing user interviews with your top users/champions. These users can help you explicitly define the data they need brought along to Mixpanel (mapped to their key questions and KPIs) so you can focus on what matters. Because these users are the ones building reporting others use, capturing their use cases and making them change agents can be highly beneficial to your migration. + +This data audit step is optional, but highly recommended - It is a larger upfront investment to avoid higher maintenance costs in the future. + +## Loading historical data 📊 + +We recommend loading a year’s worth (or less) of historical data during your migration. This will allow your team to review year-over-year trends easily and do historical analysis as needed. + +To backfill data, we recommend: + +- If you have a data warehouse with Amplitude data: Leverage the Import API or a Reverse ETL tool to import to Mixpanel +- If you have a data warehouse without Amplitude data: Export your data to the data warehouse so you have a record, and then Import API or Reverse ETL +- If you do not have a data warehouse: Since there is no historical record of data, for this method you will need to export your data from Amplitude and move it into Mixpanel - we provide an easy to use helper function for this [here](https://github.com/mixpanel/mixpanel-utils#import-from-amplitude) + +It is also recommended you load the data into a test project with a limited subset (for ex, a single day or data or a sample of the entire dataset) to get started. This will help you identify any errors in the end to end process before you do a full historical data load. + +## Change management: Moving the users 👥 + +It is recommended your Mixpanel champion or owner first set up your [Organization settings](https://help.mixpanel.com/hc/en-us/articles/360021085271-Organization-Settings) and [Project settings](https://help.mixpanel.com/hc/en-us/articles/115004490503-Project-Settings). This will ensure the right access level for your team and enable you to prepare the workspace for ingestion. This can be done later but doing it up front will allow for you to set key settings for data ingestion (US vs EU servers, project timezone, etc.). + +Once data is live, we shift our focus to change management and migrating the existing users. We mitigate risk here by: + +- Going team by team to assess current Amplitude reports, and bringing over only what really matters +- Running targeted trainings where we re-build Amplitude reports side-by-side in Mixpanel to teach users to fish +- Building a product with awesome UI/UX that will make up for the up-front costs in simpler, more powerful analysis down the line + +Our goal is to focus on each team individually, and we can process multiple in parallel. A team is the perfect unit to focus on as they have shared context and goals, so their needs as far as metrics and analysis will be similar. We can then help each team to the point they can self-serve answers from Mixpanel to answer their questions. + +## Ongoing Success 🎡 + +After the migration, we often focus on longer term goals like: + +- Improving Data Governance → Creating scaleable processes and strategies for managing data at scale +- Optimizing Analysis → Helping end users analyze data for more use cases, faster +- Building a Product Analytics Practice → Cultural change to be a self-serve, data democratized organization + +Mixpanel Customer Success will work with you to define your ongoing needs and build a plan specific to the outcomes you need to drive. You can read more about how we do this [here](https://mixpanel.com/blog/establish-a-product-analytics-practice/). diff --git a/pages/docs/tutorials/mixpanel-analysis/_meta.json b/pages/docs/tutorials/mixpanel-analysis/_meta.json new file mode 100644 index 0000000000..5c32149738 --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/_meta.json @@ -0,0 +1,13 @@ +{ + "overview": "Overview", + "data-model": "Data Model", + "board": "Boards", + "cohort": "Cohort", + "insights": "Insights", + "funnels": "Funnels", + "retention": "Retention", + "flows": "Flow", + "impact": "Impact", + "signal": "Signal", + "data-management": "Lexicon" +} diff --git a/pages/docs/tutorials/mixpanel-analysis/board.mdx b/pages/docs/tutorials/mixpanel-analysis/board.mdx new file mode 100644 index 0000000000..9f8d6a60ec --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/board.mdx @@ -0,0 +1,8 @@ +## Overview + +A Board is a collection of reports, text, and images or videos. Boards can also be created using the Mixpanel Templates feature. + + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/cohort.mdx b/pages/docs/tutorials/mixpanel-analysis/cohort.mdx new file mode 100644 index 0000000000..83cdb8540f --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/cohort.mdx @@ -0,0 +1,15 @@ +## Overview + +Cohorts are groups of users defined by a chosen set of criteria, like a shared property or sequence of events. When you define a cohort, you can use it to group and filter data in the Analysis reports. You can also use cohorts to target groups of users via messaging integrations. + ++ +
+ +## Note on cohorts whose filters contain user properties + +Because user profile properties only store the most recent value, cohorts involving user profile properties will use the current value for those properties (even if the value changed over time). + +For example, suppose the cohort’s filter criteria is: users where user[“City”] == “SF” and “Did Event: Order Ride 3 times in Last 7 days”. + +Mixpanel computes the above over the last 30 days and then groups the set of users who have property user[“City”] == “SF” as of right now and intersect that with the daily cohort of users who did Order Ride 3 times in the last 7 days. diff --git a/pages/docs/tutorials/mixpanel-analysis/data-management.mdx b/pages/docs/tutorials/mixpanel-analysis/data-management.mdx new file mode 100644 index 0000000000..680cbae7ef --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/data-management.mdx @@ -0,0 +1,7 @@ +## Lexicon +### Overview +Lexicon serves as a data dictionary where you can store descriptions of your events and their properties. Discover how to effectively manage your data on Lexicon. + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/data-model.mdx b/pages/docs/tutorials/mixpanel-analysis/data-model.mdx new file mode 100644 index 0000000000..aa940a7e3d --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/data-model.mdx @@ -0,0 +1,30 @@ +## Overview + +Unlike some other analytics tools which are limited to tracking pre-defined measures of engagement, such as page views and browser sessions, Mixpanel employs an event-based, user-centric model that tracks the specific actions that individual users take within your product. + +This event-based approach to analytics captures a deeper understanding of user engagement, which allows for more granular analysis and effective targeting of messages and experiments. + +As for the actual structure of the Mixpanel data model, it is built on three key concepts: events, properties, and user profiles. + + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/flows.mdx b/pages/docs/tutorials/mixpanel-analysis/flows.mdx new file mode 100644 index 0000000000..de2fe220cf --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/flows.mdx @@ -0,0 +1,7 @@ +## Overview +Flows identifies the most frequent paths taken by users to or from any event. Use Flows to understand how your users sequentially perform events in your product, and analyze drop-offs or unsuccessful behavior. + + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/funnels.mdx b/pages/docs/tutorials/mixpanel-analysis/funnels.mdx new file mode 100644 index 0000000000..2ed71f2efd --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/funnels.mdx @@ -0,0 +1,19 @@ +## Overview +Mixpanel’s Funnels allows you to examine how end-users perform events in a series. Funnels calculate and display the amount of users who convert from one event to another within a particular time window. This allows you to identify where your users drop off, what segments convert the most, and other important facets of the user journey. + + ++ +
+ +## Configuring Conversion Criteria + ++ +
+ +## Applying Advanced Data Functions + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/impact.mdx b/pages/docs/tutorials/mixpanel-analysis/impact.mdx new file mode 100644 index 0000000000..219d6b8799 --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/impact.mdx @@ -0,0 +1,6 @@ +## Overview +Mixpanel’s Impact report measures the effects of product or marketing launches on your key metrics. Impact calculates the user adoption of the launch, the impact of the launch on an important event, and the differences between users that adopt the launch and those that do not. + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/insights.mdx b/pages/docs/tutorials/mixpanel-analysis/insights.mdx new file mode 100644 index 0000000000..221fe65c3a --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/insights.mdx @@ -0,0 +1,25 @@ +## Overview +Insights is a powerful and flexible tool designed to visualize trends and compositions within your data. You can analyze events, cohorts, and user profiles, and display the data in a wide variety of chart types. + ++ +
+ +## Analyzing User Trends + ++ +
+ +## Applying Advanced Data Functions + ++ +
+ +## Visualizing User Cohorts and Profiles + ++ +
+ diff --git a/pages/docs/tutorials/mixpanel-analysis/overview.md b/pages/docs/tutorials/mixpanel-analysis/overview.md new file mode 100644 index 0000000000..657c0fa289 --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/overview.md @@ -0,0 +1,3 @@ +In this tutorial, we will explore the fundamentals of how Mixpanel works and highlight some of the key features to get you started. + +Log in to your Mixpanel account to follow along. Don't have an account yet? Get your free Mixpanel demo account [here](https://mixpanel.com/project/3/view/79/app/boards) to access the demo datasets. diff --git a/pages/docs/tutorials/mixpanel-analysis/retention.mdx b/pages/docs/tutorials/mixpanel-analysis/retention.mdx new file mode 100644 index 0000000000..99bb60e202 --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/retention.mdx @@ -0,0 +1,24 @@ +## Overview +The Retention report in Mixpanel is designed to assess user engagement over a specified period of time. Retention of your users is critical to achieving product-market fit and sustainable long-term growth, and this report will help you understand how long users continue to come back and find value from your product. + ++ +
+ +## Understanding Retention Criteria + ++ +
+ +## Interpreting Mixpanel Retention Report + ++ +
+ +## Retention Frequency Analysis + ++ +
diff --git a/pages/docs/tutorials/mixpanel-analysis/signal.mdx b/pages/docs/tutorials/mixpanel-analysis/signal.mdx new file mode 100644 index 0000000000..1729ac2b75 --- /dev/null +++ b/pages/docs/tutorials/mixpanel-analysis/signal.mdx @@ -0,0 +1,6 @@ +## Overview +Signal measures the association between a correlation event and a goal event and quantifies the correlation between the two. This facilitates a deeper understanding of the behaviors that drive customer conversions, and can help guide product decisions. + ++ +
diff --git a/pages/docs/tutorials/setting-up-mixpanel.md b/pages/docs/tutorials/setting-up-mixpanel.md new file mode 100644 index 0000000000..9d9df40e27 --- /dev/null +++ b/pages/docs/tutorials/setting-up-mixpanel.md @@ -0,0 +1,65 @@ +## Setting Up Mixpanel + +### Mixpanel Organization +Each Mixpanel customer is assigned an [Organization](https://help.mixpanel.com/hc/en-us/articles/360020461952#organizations-introduction) which serves as the controlling entity for managing all your Mixpanel analytics needs. + +- [Pricing / Billing Plan](https://help.mixpanel.com/hc/en-us/categories/115000963103#billing-and-plans) - determines data volume limits and features available across all projects in the organization +- [Mixpanel Project(s)](https://help.mixpanel.com/hc/en-us/categories/115000963103#project-configuration) - container for product's analytics data (events, properties, user profiles, reports, etc.) +- [User Account(s)](https://help.mixpanel.com/hc/en-us/categories/115000963103#account-and-organization) - used to sign into Mixpanel given the appropriate role for organization and project level access +- Other organization settings - [teams](https://help.mixpanel.com/hc/en-us/articles/360020731831-Create-and-Manage-Teams), [service accounts](https://developer.mixpanel.com/reference/service-accounts), [access security (SSO/ 2FA)](https://help.mixpanel.com/hc/en-us/categories/115000963103#access-and-security), [data & privacy](https://help.mixpanel.com/hc/en-us/sections/115001299023-Data-Security-and-Privacy), etc. + +### Mixpanel Projects +Each Mixpanel organization contains one or more [Projects](https://help.mixpanel.com/hc/en-us/articles/115004505106-Create-and-Manage-Projects) that house events, properties, user profiles, and other reporting metadata that can be created with EU data residency if applicable. + +- [Timezone](https://help.mixpanel.com/hc/en-us/articles/115004547203-Manage-Timezones-for-Projects-in-Mixpanel) - [dates](https://help.mixpanel.com/hc/en-us/articles/115004547063#date) (including timestamps) are ingested in UTC and converted to the project’s configured timezone for reporting. +- Access Keys + - [Project Token](https://help.mixpanel.com/hc/en-us/articles/115004502806) - used solely for ingestion to identify (not authenticate) a project when collecting data in front-end implementations (client-side SDKs or Ingestion API) + - [API/Project Secret](https://help.mixpanel.com/hc/en-us/articles/115004490503#api-secret) - legacy authentication for importing and exporting data, Service Accounts are the preferred and should be used where possible as API SDecret will be deprecated over time +- Other project settings - [group keys](https://help.mixpanel.com/hc/en-us/articles/360025333632#implementation), [data views](https://help.mixpanel.com/hc/en-us/articles/360043782572), [service accounts](https://developer.mixpanel.com/reference/service-accounts), [public dashboard](https://help.mixpanel.com/hc/en-us/articles/4402022733844), [sessions](https://help.mixpanel.com/hc/en-us/articles/115004695223), etc. + +#### Create at least 2 Mixpanel Projects (Production and Development) +Mixpanel recommends tracking 1 product with multiple platforms (mobile, web, etc.) into one project, but [separate projects for development and production](https://help.mixpanel.com/hc/en-us/articles/360001354886-Automatically-Separate-Development-Data). There may be [factors](https://help.mixpanel.com/hc/en-us/articles/115004491683-When-To-Use-Multiple-Projects#factors-to-consider) where implementing separate projects is required, please refer to the Mixpanel Help. + + + +### Mixpanel User Accounts +Each Mixpanel user account belongs to an organization and may be assigned with multiple projects with varying permissions / roles. + +- [Organization Role](https://help.mixpanel.com/hc/en-us/articles/360025387911-Organization-Roles-and-Permissions) - each user will have a single organization role per organization + - Owner (at least one) - super user for the organization and all projects underneath + - Admin - manage projects, members, and roles in the organization (with [certain exceptions](https://help.mixpanel.com/hc/en-us/articles/360025387911-Organization-Roles-and-Permissions#admin)) + - Billing Admin - primarily for managing Billing Plans + - Member - *basic membership* for a user to have access to Project(s) and or Team(s) + +- [Project Role](https://help.mixpanel.com/hc/en-us/articles/360024613412-Project-Roles-and-Permissions-) - each user can have multiple project roles, where it conflicts [permissions are additive](https://help.mixpanel.com/hc/en-us/articles/360024613412-Project-Roles-and-Permissions-#having-multiple-roles-at-once) + - Owner - super user for the project, default for organization owners + - Admin - manage project (except delete, reset, and security) and members within, default for organization admins + - Analyst - create, save, edit reports + share and make public dashboards (*most common role for users*) + - Consumer - create, save, edit reports but unable to share or create public dashboards + +#### User Access Management Approach +There are two general approaches to user management in Mixpanel + + + +#### Using Mixpanel Teams +Mixpanel enables assignment of projects and project roles to groups of users called [Teams](https://help.mixpanel.com/hc/en-us/articles/360020731831-Create-and-Manage-Teams) with the flexibility to also assign such projects and project roles to individual user accounts if required. + + + +#### Basic User Account Setup +Organization Owners and Admins can assign projects or teams directly to user accounts at the organization level by minimally provisioning them with an organization Membership. + + + +Project Owners and Admins can be created to delegate access provisioning privileges at the project level. A [default project role](https://help.mixpanel.com/hc/en-us/articles/360020731811-Invite-and-Manage-Users#setting-a-default-role-on-a-project) can also be set for All Users in the Organization as a baseline access. Teams are not available at the project level. + + + +#### Single Sign-On (SSO) and 2FA +Mixpanel provides [Single Sign-On (SSO)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On) access to enterprise accounts using either an [Identity Provider (IDP)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On#set-up-your-idp) or a custom SAML implementation such as [Okta](https://help.mixpanel.com/hc/en-us/articles/115004474143) or [Microsoft Azure](https://help.mixpanel.com/hc/en-us/articles/360040323292). +- Enabling [Just in Time (JIT)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On#just-in-time-provisioning) provisioning using SAML removes the need for organization admins to invite individual users to an organization. +- IDPs (Okta, Onelogin, and Azure) that have auto-provisioning integrations with Mixpanel enables syncing of access provisioning and deprovisioning for users. +- To give provisioned users default access to projects, invite all users in the organization by [Setting a Default Role on a Project](https://help.mixpanel.com/hc/en-us/articles/360020731811-Invite-and-Manage-Users#setting-a-default-role-on-a-project). + +Mixpanel also provides [Two Factor Authentication (2FA)](https://help.mixpanel.com/hc/en-us/articles/115004485966-Two-Factor-Authentication-2FA-) feature requiring users to provide a security code sent via SMS to their configure mobile number to verify their identity. diff --git a/pages/tutorials.mdx b/pages/tutorials.mdx deleted file mode 100644 index 7f7347393a..0000000000 --- a/pages/tutorials.mdx +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Tutorials" ---- - -These are the tutorials diff --git a/pages/tutorials/_meta.json b/pages/tutorials/_meta.json index cc42fb2783..f574b3eab3 100644 --- a/pages/tutorials/_meta.json +++ b/pages/tutorials/_meta.json @@ -1,4 +1,8 @@ { - "chapter-1": "Chapter 1: Planning Your Implementation", - "chapter-2": "Chapter 2: Making Your First Report" + "setting-up-mixpanel": "Setting Up Mixpanel", + "analytics-strategy": "Analytics Strategy", + "creating-a-tracking-plan": "Creating a Tracking Plan", + "mixpanel-analysis": "Mixpanel Analysis", + "developers": "Mixpanel for Developers", + "migrating-to-mixpanel-from-amplitude": "Migrating to Mixpanel from Amplitude" } diff --git a/pages/tutorials/analytics-strategy.md b/pages/tutorials/analytics-strategy.md new file mode 100644 index 0000000000..bb2099e4ef --- /dev/null +++ b/pages/tutorials/analytics-strategy.md @@ -0,0 +1,2 @@ +## Overview +Defining the right metrics to track product performance can be a challenging task for any business. Companies have different goals and unique products that require a customized approach to analytics. To help you define your metrics, we have crafted a framework that outlines the types of metrics, how to organize them, and the key categories to consider. In [How to Determine Your Goals And Metrics guide](https://help.mixpanel.com/hc/en-us/articles/360035109991), we will explore the focus metric, Level 1 and Level 2 metrics, and how to organize them to ensure each team understands how their metrics contribute to the overall product performance. diff --git a/pages/tutorials/chapter-1.md b/pages/tutorials/chapter-1.md deleted file mode 100644 index 2c169735ce..0000000000 --- a/pages/tutorials/chapter-1.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "Plan Your Implementation" ---- - -Implementing a new tool can be daunting, but it doesn’t have to be. You can implement Mixpanel in a few different ways to ensure it fits with the rest of your tech stack seamlessly. - -## Already Collect Data With a CDP or In-House Tools? -### Customer Data Platform (CDP) -If you already send events to a CDP like [Segment](https://segment.com/docs/connections/destinations/catalog/actions-mixpanel/) or [Rudderstack](https://rudderstack.com/integration/mixpanel/), you can get up and running with Mixpanel in seconds. - -### Reverse ETL -If you want a more out-of-the-box solution to load data from your warehouse, Mixpanel also connects to a variety of Reverse ETL tools including [Census](https://docs.getcensus.com/destinations/mixpanel) and [Hightouch](https://hightouch.io/docs/destinations/mixpanel/). These make it easy to route data from your warehouse to Mixpanel and all other tools in your stack. - -### Cloud -If you already collect events with your own internal systems, see our [Amazon S3](/tracking/integrations/s3-import) and [Google Cloud Storage](/tracking/integrations/gcs-import) guides to reliably load these events into Mixpanel. - -## Need To Start Tracking Product Data? -It takes less than 5 minutes to track an event to Mixpanel with our Javascript, server, or mobile SDKs. There are two general approaches when it comes to tracking with our SDKs: - -* **Server-Side (Recommended):** In this method, you send events from your servers to Mixpanel. This approach is the most reliable and easy to maintain, since it lives in an environment that you control. It also means that you can add tracking in one place (your servers) rather than in 3 places (web, iOS, Android), which keeps tracking unified and clean. See our [quickstart](/tracking/server) and [best practices](/tracking/how-tos/effective-server) for more details on effective server-side tracking. - -* **Client-Side:** In this method, events are generated on the client device and sent to the Mixpanel API. There are two types of client-side tracking: web (Javascript) and mobile. This can be faster to set up, but is the least reliable form of tracking due to ad-blockers. It's also harder to update tracking, since the environment where the tracking code runs is out of your control (web or mobile clients). You can improve reliability of client-side tracking using a [proxy](/tracking/how-tos/tracking-via-proxy), but this takes more effort. - -In general, we recommend tracking everything you possibly via your servers, and only supplementing that with client-side tracking when necessary. - -## What To Track -If you’re just starting to track data, we suggest starting simple by tracking two events critical to your product. - -> 📘 -> -> Not sure what an event or property is? Check out [What is Mixpanel](/getting-started/what-is-mixpanel) to get a quick introduction to these important concepts. - -### Sign Up Event -This is the event where a user makes themselves known to your product by “creating an account”. We recommend tracking Sign Up because it's a quick and easy way to get real insights on your product’s growth. - -You can do this with a simple code snippet: -```javascript -mixpanel.track("Sign Up") -``` -Tracking a sign up event can let you answer simple but key questions like: - -🌱 **What is our growth? How many people are signing up on our website (daily, monthly, etc.)?** - -Mixpanel also lets you augment this data with event properties, like a referral source, or if the user opted out of emails. - -You can add tracked properties to the code by labeling each event property and assigning it a value in the code snippet, like in this example: -```javascript -mixpanel.track('Sign Up', { - 'source': "Pat's affiliate site", - 'Opted out of email': true, -}); -``` -This can help you answer even deeper questions like: - -📲 **Which platform are most of our customers signing up on?** - -📥 **What channels are generating new sign ups most effectively?** - -### Value Moment Event -A value moment is a key user action that indicates that a user is able to generate or realize value in your product, and is often a strong predictor of healthy user engagement and retention. - -The value moment event should be tailored for your specific product. For a social product it's _creating a post_, for a streaming platform it's _completing a TV series_, for an e-commerce site it could be _completing a purchase_. - -Here’s an example snippet that includes both a value moment event ‘Purchased Item’ and properties 'Item Type' and 'Price': -```javascript -mixpanel.track('Purchased Item', { - 'Item Type': 'Coffee', - 'Price': 2.50, -}); -``` -Tracking a value moment can help answer questions like: - -✨ **What does active engagement look like? How many users are experiencing value in my product?** - -💞 **What is our retention? How many people are coming back to realize value in our product?** - -💰 **What is our activation rate? How many people who sign up make it to the Value Moment?** - -> 📘See Your Events in Action -> -> Once you've implemented your signup and value moment events, try the [Company KPIs template](https://mixpanel.com/project?show-event-translator=true) to turn your two events into nine unique reports with only a few simple clicks. - -From here, you can gradually start tracking more events to better understand user behavior in your app. diff --git a/pages/tutorials/chapter-2.md b/pages/tutorials/chapter-2.md deleted file mode 100644 index 2c169735ce..0000000000 --- a/pages/tutorials/chapter-2.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "Plan Your Implementation" ---- - -Implementing a new tool can be daunting, but it doesn’t have to be. You can implement Mixpanel in a few different ways to ensure it fits with the rest of your tech stack seamlessly. - -## Already Collect Data With a CDP or In-House Tools? -### Customer Data Platform (CDP) -If you already send events to a CDP like [Segment](https://segment.com/docs/connections/destinations/catalog/actions-mixpanel/) or [Rudderstack](https://rudderstack.com/integration/mixpanel/), you can get up and running with Mixpanel in seconds. - -### Reverse ETL -If you want a more out-of-the-box solution to load data from your warehouse, Mixpanel also connects to a variety of Reverse ETL tools including [Census](https://docs.getcensus.com/destinations/mixpanel) and [Hightouch](https://hightouch.io/docs/destinations/mixpanel/). These make it easy to route data from your warehouse to Mixpanel and all other tools in your stack. - -### Cloud -If you already collect events with your own internal systems, see our [Amazon S3](/tracking/integrations/s3-import) and [Google Cloud Storage](/tracking/integrations/gcs-import) guides to reliably load these events into Mixpanel. - -## Need To Start Tracking Product Data? -It takes less than 5 minutes to track an event to Mixpanel with our Javascript, server, or mobile SDKs. There are two general approaches when it comes to tracking with our SDKs: - -* **Server-Side (Recommended):** In this method, you send events from your servers to Mixpanel. This approach is the most reliable and easy to maintain, since it lives in an environment that you control. It also means that you can add tracking in one place (your servers) rather than in 3 places (web, iOS, Android), which keeps tracking unified and clean. See our [quickstart](/tracking/server) and [best practices](/tracking/how-tos/effective-server) for more details on effective server-side tracking. - -* **Client-Side:** In this method, events are generated on the client device and sent to the Mixpanel API. There are two types of client-side tracking: web (Javascript) and mobile. This can be faster to set up, but is the least reliable form of tracking due to ad-blockers. It's also harder to update tracking, since the environment where the tracking code runs is out of your control (web or mobile clients). You can improve reliability of client-side tracking using a [proxy](/tracking/how-tos/tracking-via-proxy), but this takes more effort. - -In general, we recommend tracking everything you possibly via your servers, and only supplementing that with client-side tracking when necessary. - -## What To Track -If you’re just starting to track data, we suggest starting simple by tracking two events critical to your product. - -> 📘 -> -> Not sure what an event or property is? Check out [What is Mixpanel](/getting-started/what-is-mixpanel) to get a quick introduction to these important concepts. - -### Sign Up Event -This is the event where a user makes themselves known to your product by “creating an account”. We recommend tracking Sign Up because it's a quick and easy way to get real insights on your product’s growth. - -You can do this with a simple code snippet: -```javascript -mixpanel.track("Sign Up") -``` -Tracking a sign up event can let you answer simple but key questions like: - -🌱 **What is our growth? How many people are signing up on our website (daily, monthly, etc.)?** - -Mixpanel also lets you augment this data with event properties, like a referral source, or if the user opted out of emails. - -You can add tracked properties to the code by labeling each event property and assigning it a value in the code snippet, like in this example: -```javascript -mixpanel.track('Sign Up', { - 'source': "Pat's affiliate site", - 'Opted out of email': true, -}); -``` -This can help you answer even deeper questions like: - -📲 **Which platform are most of our customers signing up on?** - -📥 **What channels are generating new sign ups most effectively?** - -### Value Moment Event -A value moment is a key user action that indicates that a user is able to generate or realize value in your product, and is often a strong predictor of healthy user engagement and retention. - -The value moment event should be tailored for your specific product. For a social product it's _creating a post_, for a streaming platform it's _completing a TV series_, for an e-commerce site it could be _completing a purchase_. - -Here’s an example snippet that includes both a value moment event ‘Purchased Item’ and properties 'Item Type' and 'Price': -```javascript -mixpanel.track('Purchased Item', { - 'Item Type': 'Coffee', - 'Price': 2.50, -}); -``` -Tracking a value moment can help answer questions like: - -✨ **What does active engagement look like? How many users are experiencing value in my product?** - -💞 **What is our retention? How many people are coming back to realize value in our product?** - -💰 **What is our activation rate? How many people who sign up make it to the Value Moment?** - -> 📘See Your Events in Action -> -> Once you've implemented your signup and value moment events, try the [Company KPIs template](https://mixpanel.com/project?show-event-translator=true) to turn your two events into nine unique reports with only a few simple clicks. - -From here, you can gradually start tracking more events to better understand user behavior in your app. diff --git a/pages/tutorials/creating-a-tracking-plan.md b/pages/tutorials/creating-a-tracking-plan.md new file mode 100644 index 0000000000..f11c2b151e --- /dev/null +++ b/pages/tutorials/creating-a-tracking-plan.md @@ -0,0 +1,33 @@ +## Creating a Tracking Plan + +### Utilise a Tracking Plan to Tie Key Goals to Events Tracked +Mixpanel recommends creating a tracking plan based on the key business goals identified from your analytics strategy. It should: + +- Be a centralized document that should serve as the source of truth on your Mixpanel implementation +- Define your business goals / KPIs and analytics strategy metrics +- Outline the events, event properties, and user profile properties aligned to your metrics +- Be treated as a living and shared document that is continuously updated with any implementation changes +- Include notes that are referenced across teams (product, marketing, data science, tech / dev teams, etc.) + +This will be important for team members who are involved in defining use cases to be implemented in Mixpanel as well as, tech teams involved in the actual implementation of the codes. + +### Tracking Plan Methodology +Be intentional with your data. Prioritize the most critical data you'll need based on your analytics strategy and KPIs, then iterate. Tracking everything and anything your user can do in your product can lead to unnecessary development effort and unused data. + +#### Define and prioritize KPIs +Define the top KPIs and metrics that will help measure success and inform decisions about your product. + +#### Map KPIs to User Flows +Map each KPI / metric to the steps or actions that users take to influence each KPI / metric. For example, sign up flow will be important when measuring KPIs related to new user acquisition. Consider also the different paths that users can take to achieve the same outcomes. + +#### Translate Flows into Events / Properties +Breakdown your user flows into events (actions) and properties (context of these actions) in your tracking plan. This will ensure that you have scoped out the data you need to achieve your KPIs / metrics in Mixpanel. + +Mixpanel provides the following templates for vertical-specific tracking plans: + +- [Retail and E-commerce](https://docs.google.com/spreadsheets/d/1Kyys37m_GEL79_1BKKEnU5KxK91NF04kY-L_bFfcfqE/edit#gid=1484002407) +- [Media and Entertainment](https://docs.google.com/spreadsheets/d/1K9t53kJJjaBG36kCIbZn_qKjXR9Iy306zYZAqDrv_AM/edit?usp=sharing) +- [SaaS](https://docs.google.com/spreadsheets/d/1A5wm5MKzRfSOZfUfCAg8YpePiz8Jn3Ar_u8KBo5lD6g/edit?usp=sharing) +- [Financial Services](https://docs.google.com/spreadsheets/d/1oGv6vbIFiYbima9IX4ItpBJvuChs-zzh83MRt_dSPgg/edit?usp=sharing) + +You can also access a copy of a [blank Tracking Plan from here](https://docs.google.com/spreadsheets/d/1ZdOZ6TMtRPxy7qRxiLsvH9HWcHJM6nZydWKoThRxFKc/edit#gid=1641519238). Save a copy to your device to get started on your tracking plan. diff --git a/pages/tutorials/developers/_meta.json b/pages/tutorials/developers/_meta.json new file mode 100644 index 0000000000..1cf0ac2d00 --- /dev/null +++ b/pages/tutorials/developers/_meta.json @@ -0,0 +1,5 @@ +{ + "mixpanel-for-developers-fundamentals": "Fundamentals", + "mixpanel-for-developers-implementation": "Implementation", + "mixpanel-for-developers-id-management": "Identity Management" +} diff --git a/pages/tutorials/developers/mixpanel-for-developers-fundamentals.mdx b/pages/tutorials/developers/mixpanel-for-developers-fundamentals.mdx new file mode 100644 index 0000000000..90665d75dc --- /dev/null +++ b/pages/tutorials/developers/mixpanel-for-developers-fundamentals.mdx @@ -0,0 +1,76 @@ +## Tutorial Overview +Hello and welcome to Mixpanel for Developers Tutorial. + +This tutorial is going to consist of a couple of modules designed to help everyone understand events and properties in Mixpanel, help developers understand the Data Type it supports and how to send events to Mixpanel and enrich user data that have been documented in your Tracking Plan. + +We will also explore Mixpanel’s ID management Solution for Product Managers and Analysts to identify visitors as they go from an anonymous state to a known state and even when visitors use different devices. + +## Mixpanel Data Model +Mixpanel data is stored and isolated within a project. Mixpanel recommends tracking 1 product with multiple platforms (mobile, web, etc.) into one project, but create [separate projects for development and production](https://help.mixpanel.com/hc/en-us/articles/360001354886-Automatically-Separate-Development-Data). + +There may be [other factors where implementing separate projects](https://help.mixpanel.com/hc/en-us/articles/115004491683-When-To-Use-Multiple-Projects#factors-to-consider) is required, but do note that querying data across projects is not possible. Mixpanel supports a few different categories of data that can be used for analysis: events, user profiles, group profiles, and lookup tables. In data warehouse terminology, events make up the fact table while user profiles, group profiles, and lookup tables are dimension tables. + ++ +
+ +### Property Types +Properties are attributes that help you define the specifics of an **Event** or a **User.** +Mixpanel has many Properties defined in its Data Model. + +|Property Type|Description| +|:--- |:---| +|[Event Properties](https://help.mixpanel.com/hc/en-us/articles/360001355266)|Event Properties describes the events that are tracked within your product.| +|[Super Properties](https://help.mixpanel.com/hc/en-us/articles/360001355266#super-properties-for-events)|Super Properties are a type of Event Property that you can initialise to automatically attach to every subsequent Event you’re tracking at client side.| +|[User Profile Properties](https://help.mixpanel.com/hc/en-us/articles/115004708186)|User Profile Properties describe your users (they typically store current demographical information). User profiles are joined to events on `event.distinct_id = user_profile.distinct_id`.| +|[Group Profile Properties](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics#group-profiles)|Group Profile Properties describe group level information (similar to User Profiles Properties at user level). With Mixpanel’s [Group Analytics](https://help.mixpanel.com/hc/en-us/articles/360025333632), multiple users can be grouped and behavioural data analysed at a customised group level (such as company, account). Group profiles are joined to events on your chosen group key. For example, if you create a new group key for `company_id` your events will be joined on `event.company_id = group_profile.company_id`.| +|[Lookup Tables](https://help.mixpanel.com/hc/en-us/articles/360044139291-Lookup-tables)|Lookup Tables allow you to dynamically extend additional properties mapped to an exiting Event or User Property. For example, if you create a lookup table for "Songs" (with additional properties like `hash_tags`, `top_10`, `all_time_favorite`) and specify the mapped event property as `song_id`; you can use these additional properties when doing filtering or breakdowns for events that has `song_id` as an event property.| +|[Default Properties](https://help.mixpanel.com/hc/en-us/articles/115004613766-What-properties-do-Mixpanel-s-libraries-store-by-default-)|Default Properties (for Events and User Profiles) are collected and populated with values automatically in Mixpanel. This can happen upon data ingestion or when using certain Mixpanel client-side SDKs. Typically, they have a dollar sign ($) or “mp_” as prefix to distinguish them from normal properties.| +|Reserved Properties|Mixpanel reserves certain property names (for [Events](https://help.mixpanel.com/hc/en-us/articles/360001355266#reserved-properties-for-events) and [User Profiles](https://help.mixpanel.com/hc/en-us/articles/115004708186#reserved-properties-for-user-profiles)) for special use cases, and these may or may not be automatically populated with values. The purpose of such Reserved Properties are for processing (ie event time stamping) or for specific system features (eg: cohort exports). Examples: `time`, `$email`, `$phone`, `$name`, `$created`.| + +### Supported Data Types +Mixpanel supports five [data types](https://help.mixpanel.com/hc/en-us/articles/115004547063) for properties: String, Numeric, Boolean, Date and List. By choosing the most suitable data type for your properties, you'd be able to apply a set of [operators](https://help.mixpanel.com/hc/en-us/articles/115004547063#data-type-operators) that are most relevant to your properties in Mixpanel reports, and this will give you richer insights about your data. + +**String** +- Alphanumeric value e.g. Plan Type = "Free", Artist Name = "Bruno Mars" +- String properties have a character limit of 255 bytes. +- Mixpanel will treat any property value that doesn’t match any other data type as a String. + +**Numeric** +- Numeric (integer or decimal) value e.g. Cost = 15.00, Quantity = 5 +- You can apply operators such as sum, median and percentile on numeric properties. + +**Boolean** +- Mixpanel treats properties as boolean if the value is either the JSON constant `true` or `false` e.g. Favorited = true, Bookmarked = false. +- On Mixpanel, you can typecast any non-boolean property to boolean, +- "false", 0, null, undefined, and empty string will be typecasted to boolean `false` +- "true" and any set value that is not 0 or empty string will be typecasted to boolean `true` + +**Date** +- An ISO formatted date `YYYY-MM-DDTHH:MM:SS` in UTC e.g. Last Purchase = "2022-10-30T13:30:25", Last Login = "2022-10-29". Note that all timestamps need to be sent in UTC timezone in an ISO format. +- Mixpanel treats unix timestamps as Numeric property, however, you can typecast it to Date data type. + +**List** +- A list of values as a JSON array e.g Favourite Genres = ["Folk","Alternative"] or Favourite Numbers = [1,5,10.0] +- Limits of a List property: Event Property = 8KB, User Profile Property = 256KB, Each item in the list: 255 bytes + +## Updating User Profile Properties +Mixpanel user profile properties are mutable and they can be updated in a timely manner to reflect the latest state of the users. + +You can update user profile properties via [Mixpanel SDK](https://developer.mixpanel.com/docs/javascript#setting-profile-properties) or [Engage API](https://developer.mixpanel.com/reference/profile-set). The following are the operations supported in Mixpanel. + +**Setting profile property** +- `$set` - Sets a profile property or update a profile property value. +- `$set_once` - Sets a profile property only if they do not yet exist on Mixpanel. This ensures that the previous profile property value is not overwritten. + +**Updating numeric profile property** +- `$add` - Increments or decrements a numeric profile property. + +**Updating list profile property** +- `$union` - Merges a given list into a List profile property and it ensures there are no duplicate values in the profile property. +- `$append` - Appends a value to the end of a List profile property. +- `$remove` - Removes a value from a List profile property. + +**Removing profile properties** +- `$unset` - Remove a profile property from the user profile +- `$delete` - Remove all profile properties from the user profile. diff --git a/pages/tutorials/developers/mixpanel-for-developers-id-management.mdx b/pages/tutorials/developers/mixpanel-for-developers-id-management.mdx new file mode 100644 index 0000000000..fb69b1e008 --- /dev/null +++ b/pages/tutorials/developers/mixpanel-for-developers-id-management.mdx @@ -0,0 +1,51 @@ +## Overview + +This section provides details on implementing Mixpanel's Identity Management called Identity Merge (ID Merge for short). Note that the [Legacy Identity Management](https://help.mixpanel.com/hc/en-us/articles/115004497803-Identity-Management-Pre-Identity-Merge-Overview) is not covered in this section as Identity Merge is enabled by default for all new organizations since March 2020. + ++ +
+ +## Basic Concepts in ID Merge ++ +
+ +## ID Merge Implementation (using Client-side SDK) ++ +
+ +## ID Merge Implementation Best Practices +#### Call mixpanel.identify upon a successful sign-up / login or when an app is re-opened in a logged in state +By calling mixpanel.identify at these specific points in user journeys, you would be able to link the pre and post-login events to the same user on Mixpanel. Besides, calling mixpanel.identify when the users re-open the app in a logged in state ensures that all events in the session are tracked with the user's identifier such as user id. + +#### Track the unique identifier as a super property and user property to assist troubleshooting +You can track the user's unique identifier as a [super property via mixpanel.register](https://developer.mixpanel.com/docs/javascript#super-properties) and [user property via mixpanel.people.set](https://developer.mixpanel.com/docs/javascript#setting-profile-properties) as soon as it is available in the app i.e. on a successful sign-up / login or when an app is re-opened in a logged in state. +In the cases when ID Merge is not implemented properly, you can rely on these properties for troubleshooting purpose. + +#### Avoid creating profiles for anonymous users +Avoid creating profiles for anonymous users. If possible, cache user profile properties updates in cookie or local storage and only send them to Mixpanel after the user is identified (ie logged-in state). + +#### QA your ID management implementation during development phase +Here are a few things to look out for: +- Ensure that cross-platform, pre and post-registration events are linked to the same user on Mixpanel. +- Ensure that no duplicate profiles are created as the users go through the onboarding, registration, login and cross-platform user journey. +- Ensure that all the user’s identifiers are stored in the same Identity Cluster and all their events are displayed on a single profile on Mixpanel. + +#### Keep a record of your ID management implementation +We encourage you to document your implementation (or create a diagram of the implementation). This will come in handy when you need to re-implement this on a new platform or troubleshoot ID management issue. + +Read more about [ID Merge Implementation Best Practices](https://help.mixpanel.com/hc/en-us/articles/9648680824852) + +--- + +## FAQs +#### Is ID Merge retroactive? +Yes, ID Merge is retroactive. During merging distinct IDs that are added to the same cluster will be considered as the same user going forward. + +#### There are two types of ID Merge? +Yes, you can read more about the [difference between Original vs Simplified ID Merge](https://help.mixpanel.com/hc/en-us/articles/14383975110292) and for more details how each one works, see the links below: +- [Getting Started with Original ID Merge](https://help.mixpanel.com/hc/en-us/articles/360041039771) (default for new projects) +- [Getting Started with Simplified ID Merge](https://help.mixpanel.com/hc/en-us/articles/14377628688788) + diff --git a/pages/tutorials/developers/mixpanel-for-developers-implementation.mdx b/pages/tutorials/developers/mixpanel-for-developers-implementation.mdx new file mode 100644 index 0000000000..8c35fd20a1 --- /dev/null +++ b/pages/tutorials/developers/mixpanel-for-developers-implementation.mdx @@ -0,0 +1,50 @@ +## Implement via the Mixpanel SDK + +In this section, we will be going through an example of an event in your Tracking Plan to show how a developer can implement that event using Mixpanel’s Javascript SDK. We’ll also look at how you can update your user profiles. + ++ +
+ +### Initialise Mixpanel's SDK ++ +
+ +### Initializing Super Properties and Tracking an Event ++ +
+ +### Setting User Profile Properties ++ +
+ +## Other Ingestion methods + +Apart from Mixpanel SDKs, there are also [other ways](https://docs-git-tutorials-for-cs-mixpanel.vercel.app/docs/getting-started/plan-your-implementation#already-collect-data-with-a-cdp-or-in-house-tools) to send data into Mixpanel. + ++ +
+ +--- + +## FAQs + +#### What are the different SDKs available by Mixpanel? +- Supported client-side libraries: [JavaScript](https://developer.mixpanel.com/docs/javascript), [iOS - Objective-C](https://developer.mixpanel.com/docs/ios), [iOS - Swift](https://developer.mixpanel.com/docs/swift), [Android](https://developer.mixpanel.com/docs/android), [React Native](https://developer.mixpanel.com/docs/react-native), [Flutter](https://developer.mixpanel.com/docs/flutter), [Unity](https://developer.mixpanel.com/docs/unity) +- Supported server-side libraries: [Python](https://developer.mixpanel.com/docs/python), [Java](https://developer.mixpanel.com/docs/java), [PHP](https://developer.mixpanel.com/docs/php), [Ruby](https://developer.mixpanel.com/docs/ruby), [NodeJS](https://developer.mixpanel.com/docs/nodejs) +- [REST HTTP API](https://developer.mixpanel.com/reference/ingestion-api) + +#### Browser Cookies are unreliable, is there another way? +You can switch from cookie to local storage. You can read more about it [our article](https://help.mixpanel.com/hc/en-us/articles/115004546863#switch-from-cookies-to-localstorage). + +#### What’s the difference between time, \$mp_api_timestamp_ms, and mp_processing_time_ms? +- `time` or `$time` - actual time of the event (which could be from days in the past), typically set when mixpanel.track() is called in the SDKs or filled in directly as part of a API payload. +- `$mp_api_timestamp_ms` - the timestamp when the data is received by our ingestion api. +- `mp_processing_time_ms` - the timestamp when the data is processed and ready for queries. + +#### How to handle Date of Birth before 1/1/1970? +While the timestamp values are recommended to send in the ISO format, for dates before 1st January 1970, you can send the value like “YYYY-MM-DD”. diff --git a/pages/tutorials/migrating-to-mixpanel-from-amplitude.md b/pages/tutorials/migrating-to-mixpanel-from-amplitude.md new file mode 100644 index 0000000000..05eadc2e2b --- /dev/null +++ b/pages/tutorials/migrating-to-mixpanel-from-amplitude.md @@ -0,0 +1,300 @@ +# Migrating to Mixpanel from Amplitude + +If you’re reading this, congrats on considering making the switch from Amplitude to Mixpanel 🎊 This guide is intended to outline how the migration works, what to expect, and how to mitigate the risks and switching costs of a migration whilst accelerate time to value. + +## What a migration will solve ✅ + +- Cut-over sending live data to Mixpanel and stop sending to Amplitude +- Historical backfill of existing data +- Integrates easily with existing event data collection methods - SDKs, CDPs, DWH, RETL +- Migrates all existing/new data in entirety - full access to all events and properties you had in Amplitude + +## What a migration won’t solve ⛔ + +- Existing issues with data trust/quality or data governance → As part of the migration, we recommend a [data audit](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da) as the first step to only transfer your valuable data and clean up trust/quality issues +- Reporting, Dashboards, and Saved Entities → As part of the migration, we can review your top used reports and dashboards then [sit down with each team](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da) to re-build them in Mixpanel + +## What level of effort does the migration take? ⚖️ + +A migration primarily consists of 3 phases: + +1. Technical migration of data → Data audit, Live data cutover, Historical data import +2. Change management migration of end users → Champion identification, User interviews, Team by team specific trainings, Ensuring adoption for each team +3. Ongoing success planning → Improving data governance, Optimizing analysis, Building a product analytics practice + +From a technical perspective, the migration process is relatively straightforward. If you have an engineer with access to your data and the ability to write code/transforms to send data to new destinations, this can be done in a single sprint (1-2 weeks). + +From an end user perspective, Mixpanel is simpler and easier to learn than Amplitude but there of course will be a learning curve. The largest hurdle is copying over key saved reports, dashboards, etc. which the team is familiar with in Amplitude and teaching them how to rebuild these in Mixpanel. We recommend doing this process in detail for each team, showing them how to recreate key analyses side-by-side in Mixpanel. You can then leverage your team champions to force multiply your adoption efforts. + +When going through this migration, there is no better time to audit your own data and reports to only migrate what matters. Most data and reporting is stale after some time anyways, prioritize the data and reports your team uses every day for their Top 10 key questions. These can be easily copied over and Mixpanel also provides Customer Success resources during Onboarding to assist with this. + +## Getting started: Identify your implementation method 🚦 + +Mixpanel accepts event data from a variety of different sources. Choose your implementation method first and then you can follow the below steps for sending data to Mixpanel. + +We support the following data collection mechanisms: + +- Client-side SDKs & Server-side SDKs: Simply replace Amplitude code calls to track events with Mixpanel calls instead + + Fortunately, Mixpanel and Amplitude’s client side SDKs have *very similar* developer facing APIs. This makes it fairly easy to “find and replace” embedded Amplitude calls and swap them for Mixpanel calls. + + This section will detail the Javascript SDKs (for the sake of brevity), although both analytics platforms have fairly uniform tracking APIs for other SDKs (mobile, server-side). + + Amplitude JS Docs: [https://amplitude.github.io/Amplitude-JavaScript/](https://amplitude.github.io/Amplitude-JavaScript/) + + Mixpanel JS Docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference](https://developer.mixpanel.com/docs/javascript-full-api-reference) + + ## Installing the Mixpanel SDK: + + [https://developer.mixpanel.com/docs/javascript-quickstart#1-initialize-the-library](https://developer.mixpanel.com/docs/javascript-quickstart#1-initialize-the-library) + + # Migrating Amplitude ⇒ Mixpanel + + ### Initialization + + Amplitude’s `init()` method: + + ```jsx + var amplitudeClient = new AmplitudeClient(); + amplitudeClient.init('API_KEY') + ``` + + Mixpanel’s `init()` method: + + ```jsx + mixpanel.init('new token') + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelinit](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelinit) + + init options: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_config](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_config) + + ### Events + + Amplitude’s `logEvent()` method: + + ```jsx + amplitudeClient.logEvent('Clicked Button', {'finished_flow': false }); + ``` + + Mixpanel’s `track()` method: + + ```jsx + mixpanel.track('Clicked Button', {'finished_flow': false }) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpaneltrack](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpaneltrack) + + ### Identity Management + + Amplitude’s `setUserId()` method: + + ```jsx + amplitudeClient.setUserId('joe@gmail.com'); + ``` + + Mixpanel’s `identify()` method: + + ```jsx + mixpanel.identify('joe@gmail.com') + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelidentify](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelidentify) + + ### User Properties + + Amplitude’s `setUserProperties()` method: + + ```jsx + amplitudeClient.setUserProperties({'gender': 'female', 'sign_up_complete': true}) + ``` + + Mixpanel’s `people.set()` method: + + ```jsx + mixpanel.people.set({'gender': 'female', 'sign_up_complete': true}) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelpeople](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelpeople) + + notes: `identify()` should be called at some point in the user’s session to propagate people methods + + ### Group Analytics + + Amplitude’s `setGroup()` method: + + ```jsx + amplitudeClient.setGroup('orgId', 15); + ``` + + Mixpanel’s `set_group()` method: + + ```jsx + mixpanel.set_group('orgId', 15) + ``` + + docs: [https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_group](https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanelset_group) + +- Customer Data Platforms (CDPs) like [Segment](https://segment.com/): Go into your CDP settings to add Mixpanel as a destination, and point your data stream to Mixpanel + + Since CDPs already collect all your data via 1 SDK and route to many downstream destinations, enabling Mixpanel is straightforward. Simply go to your CDP settings and add Mixpanel as a destination: + +  + + + Once you set up the connection to Mixpanel, you can proceed with configuring key settings like: + + - which events and properties to send → only send what matters + - edit any mappings/editing/filtering that has to be done on the data → ensure high data quality and governance + - connection settings, or CDP specific settings for data syncs → control over how data is sent + + We provide Mixpanel as a destination and setup guides for all of the most popular CDPs: + + - [Segment](https://segment.com/docs/connections/destinations/catalog/actions-mixpanel/) + - [mParticle](https://docs.mparticle.com/integrations/mixpanel/audience/) + - [Rudderstack](https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/) + +- [Import API](https://developer.mixpanel.com/reference/import-events): Point your event ingestion pipeline to [Mixpanel’s robust API](https://developer.mixpanel.com/reference/import-events) for data ingestion + + If you currently send data to Amplitude directly to their API, you can simply swap out the Amplitude API with the Mixpanel API. + + ### Sending Events + + Amplitude’s `/track` API Endpoint is `[https://api2.amplitude.com/2/httpapi](https://api2.amplitude.com/2/httpapi)` (documented [here](https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/)). A sample request from your server for this API would look like: + + ```bash + curl -X POST https://api2.amplitude.com/2/httpapi \ + -H 'Content-Type: application/json' \ + -H 'Accept: */*' \ + --data '{ + "api_key": "YOUR_API_KEY", + "events": [{ + "user_id": "203201202", + "device_id": "C8F9E604-F01A-4BD9-95C6-8E5357DF265D", + "event_type": "watch_tutorial" + }] + }' + ``` + + Mixpanel’s `/track` API endpoint is [`https://api.mixpanel.com/import`](https://api.mixpanel.com/import) (documented [here](https://developer.mixpanel.com/reference/import-events)). A sample request from your server for this API would look like: + + ```bash + curl --request POST \ + --url 'https://api.mixpanel.com/import?strict=1&project_id=%3CYOUR_PROJECT_ID%3E' \ + --header 'Content-Encoding: gzip' \ + --header 'Content-Type: application/json' \ + --header 'accept: application/json' \ + --header 'authorization: Basic cnlhbjpyeWFu' \ + --data ' + [ + { + "event": "string", + "properties": { + "time": 0, + "distinct_id": "string", + "$insert_id": "string" + } + } + ] + ' + ``` + + The big difference between the APIs are: + + - **Authentication:** Amplitude authenticates in the request payload, whereas Mixpanel uses your project token in the request URL alongside basic auth. Mixpanel authentication can be done via a service account as described [here](https://developer.mixpanel.com/reference/ingestion-api-authentication). Be sure to move the authentication outside the payload. + - **Event JSON Structure:** Amplitude and Mixpanel have slightly different structures (explained further below). You will want to remap the Amplitude event format to the expected Mixpanel JSON payload as described [here](https://www.notion.so/Migrating-to-Mixpanel-from-Amplitude-723407166fbf4f7ba9365034691502da). + +- [Reverse ETL](https://mixpanel.com/blog/what-is-reverse-etl-product-data/) (RETL) tools like [Census](https://getcensus.com): Go into your RETL settings to add Mixpanel as a destination, and point your syncs to Mixpanel + + If you already send data to Amplitude with your data warehouse as the source of truth using reverse ETL, sending data to Mixpanel requires adding a new destination and syncing the same models you have been syncing to Amplitude. This option is like a hybrid between the CDP and Import API options above - you can use the reverse ETL tool to set Mixpanel up simply as a destination and then the tool will handle all of the remapping at the API level for you. + + Simply go to your RETL settings and add Mixpanel as a connection: + +  + + + We provide Mixpanel as a destination and setup guides for all of the most popular RETL tools: + + - [Census](https://docs.getcensus.com/destinations/mixpanel) + - [Hightouch](https://hightouch.com/docs/destinations/mixpanel) + - [Segment](https://segment.com/docs/connections/reverse-etl/) + + +## Differences in the data models ☯️ + +Both Mixpanel and Amplitude are product analytics tools which collect event-based behavioral data about your users. [Events](https://developer.mixpanel.com/reference/import-events) are commonly expressed as JSON which represent the name of the user action, the ID of the user, the time at which the action took place, and all associated metadata. Events are immutable, and represent data at the time of which an action takes place. + +```json +{ + "event": "Signup", + "properties": + { + "time": 1618716477000, + "distinct_id": "91304156-cafc-4673-a237-623d1129c801", + "$insert_id": "29fc2962-6d9c-455d-95ad-95b84f09b9e4", + "Referred by": "Friend", + "URL": "mixpanel.com/signup" + } +} +``` + +In addition to events, Mixpanel supports an additional type of data that Amplitude does not. This data is known as [user profiles](https://developer.mixpanel.com/reference/profile-set), which represents dimensional data that is always updated to the most recent value for a user. User data allows you to segment your reporting by both historical point-in-time data as well as real-time dimensional data about your users. + +```json +{ + "$distinct_id": "13793", + "$set": + { + "name": "Robert" + } +} +``` + +We also support additional data for extending your use cases with Mixpanel: + +- [Group profiles](https://developer.mixpanel.com/reference/group-set-property): Used with our Group Analytics product add-on to allow you to pivot quickly between users and other entities in your analysis. A common use case is for a B2B company to pivot between analyzing users and analyzing accounts. +- [Lookup tables](https://developer.mixpanel.com/reference/lookup-tables): For event data which was already sent, you can use these to extend the data already sent into Mixpanel. A common use case is taking an identifier like a transaction ID, item ID, etc. and using lookup tables to enrich the data with additional information like the amount, category, etc. from your data warehouse. + +## Data audit: Cleaning up the mess 🧹 + +We’ve found from experience that <20% of the data in a product analytics tool is used for 80%+ of the queries. This is especially true the longer you have been using a tool - over time teams add more and more tracking for new events and properties, and without strong data governance practices, you will inevitably have some messy data in Amplitude. + +In the spirit of making sense of the mess, it is not recommended that you bring all historical data in from Amplitude. A common practice is to leverage Amplitude’s [Data](http://data.amplitude.com) Product to first understand which events and properties are queried by your users. No queries in the past 30 days? These events and properties have probably gone stale - there is low value and high effort in brining them to Mixpanel, so cut them from your import and do not migrate the existing tracking. + +After you’ve gotten rid of the obvious (the events and properties no one uses), you can fine tune this approach by doing user interviews with your top users/champions. These users can help you explicitly define the data they need brought along to Mixpanel (mapped to their key questions and KPIs) so you can focus on what matters. Because these users are the ones building reporting others use, capturing their use cases and making them change agents can be highly beneficial to your migration. + +This data audit step is optional, but highly recommended - It is a larger upfront investment to avoid higher maintenance costs in the future. + +## Loading historical data 📊 + +We recommend loading a year’s worth (or less) of historical data during your migration. This will allow your team to review year-over-year trends easily and do historical analysis as needed. + +To backfill data, we recommend: + +- If you have a data warehouse with Amplitude data: Leverage the Import API or a Reverse ETL tool to import to Mixpanel +- If you have a data warehouse without Amplitude data: Export your data to the data warehouse so you have a record, and then Import API or Reverse ETL +- If you do not have a data warehouse: Since there is no historical record of data, for this method you will need to export your data from Amplitude and move it into Mixpanel - we provide an easy to use helper function for this [here](https://github.com/mixpanel/mixpanel-utils#import-from-amplitude) + +It is also recommended you load the data into a test project with a limited subset (for ex, a single day or data or a sample of the entire dataset) to get started. This will help you identify any errors in the end to end process before you do a full historical data load. + +## Change management: Moving the users 👥 + +It is recommended your Mixpanel champion or owner first set up your [Organization settings](https://help.mixpanel.com/hc/en-us/articles/360021085271-Organization-Settings) and [Project settings](https://help.mixpanel.com/hc/en-us/articles/115004490503-Project-Settings). This will ensure the right access level for your team and enable you to prepare the workspace for ingestion. This can be done later but doing it up front will allow for you to set key settings for data ingestion (US vs EU servers, project timezone, etc.). + +Once data is live, we shift our focus to change management and migrating the existing users. We mitigate risk here by: + +- Going team by team to assess current Amplitude reports, and bringing over only what really matters +- Running targeted trainings where we re-build Amplitude reports side-by-side in Mixpanel to teach users to fish +- Building a product with awesome UI/UX that will make up for the up-front costs in simpler, more powerful analysis down the line + +Our goal is to focus on each team individually, and we can process multiple in parallel. A team is the perfect unit to focus on as they have shared context and goals, so their needs as far as metrics and analysis will be similar. We can then help each team to the point they can self-serve answers from Mixpanel to answer their questions. + +## Ongoing Success 🎡 + +After the migration, we often focus on longer term goals like: + +- Improving Data Governance → Creating scaleable processes and strategies for managing data at scale +- Optimizing Analysis → Helping end users analyze data for more use cases, faster +- Building a Product Analytics Practice → Cultural change to be a self-serve, data democratized organization + +Mixpanel Customer Success will work with you to define your ongoing needs and build a plan specific to the outcomes you need to drive. You can read more about how we do this [here](https://mixpanel.com/blog/establish-a-product-analytics-practice/). diff --git a/pages/tutorials/mixpanel-analysis/_meta.json b/pages/tutorials/mixpanel-analysis/_meta.json new file mode 100644 index 0000000000..5c32149738 --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/_meta.json @@ -0,0 +1,13 @@ +{ + "overview": "Overview", + "data-model": "Data Model", + "board": "Boards", + "cohort": "Cohort", + "insights": "Insights", + "funnels": "Funnels", + "retention": "Retention", + "flows": "Flow", + "impact": "Impact", + "signal": "Signal", + "data-management": "Lexicon" +} diff --git a/pages/tutorials/mixpanel-analysis/board.mdx b/pages/tutorials/mixpanel-analysis/board.mdx new file mode 100644 index 0000000000..9f8d6a60ec --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/board.mdx @@ -0,0 +1,8 @@ +## Overview + +A Board is a collection of reports, text, and images or videos. Boards can also be created using the Mixpanel Templates feature. + + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/cohort.mdx b/pages/tutorials/mixpanel-analysis/cohort.mdx new file mode 100644 index 0000000000..83cdb8540f --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/cohort.mdx @@ -0,0 +1,15 @@ +## Overview + +Cohorts are groups of users defined by a chosen set of criteria, like a shared property or sequence of events. When you define a cohort, you can use it to group and filter data in the Analysis reports. You can also use cohorts to target groups of users via messaging integrations. + ++ +
+ +## Note on cohorts whose filters contain user properties + +Because user profile properties only store the most recent value, cohorts involving user profile properties will use the current value for those properties (even if the value changed over time). + +For example, suppose the cohort’s filter criteria is: users where user[“City”] == “SF” and “Did Event: Order Ride 3 times in Last 7 days”. + +Mixpanel computes the above over the last 30 days and then groups the set of users who have property user[“City”] == “SF” as of right now and intersect that with the daily cohort of users who did Order Ride 3 times in the last 7 days. diff --git a/pages/tutorials/mixpanel-analysis/data-management.mdx b/pages/tutorials/mixpanel-analysis/data-management.mdx new file mode 100644 index 0000000000..680cbae7ef --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/data-management.mdx @@ -0,0 +1,7 @@ +## Lexicon +### Overview +Lexicon serves as a data dictionary where you can store descriptions of your events and their properties. Discover how to effectively manage your data on Lexicon. + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/data-model.mdx b/pages/tutorials/mixpanel-analysis/data-model.mdx new file mode 100644 index 0000000000..aa940a7e3d --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/data-model.mdx @@ -0,0 +1,30 @@ +## Overview + +Unlike some other analytics tools which are limited to tracking pre-defined measures of engagement, such as page views and browser sessions, Mixpanel employs an event-based, user-centric model that tracks the specific actions that individual users take within your product. + +This event-based approach to analytics captures a deeper understanding of user engagement, which allows for more granular analysis and effective targeting of messages and experiments. + +As for the actual structure of the Mixpanel data model, it is built on three key concepts: events, properties, and user profiles. + + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/flows.mdx b/pages/tutorials/mixpanel-analysis/flows.mdx new file mode 100644 index 0000000000..de2fe220cf --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/flows.mdx @@ -0,0 +1,7 @@ +## Overview +Flows identifies the most frequent paths taken by users to or from any event. Use Flows to understand how your users sequentially perform events in your product, and analyze drop-offs or unsuccessful behavior. + + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/funnels.mdx b/pages/tutorials/mixpanel-analysis/funnels.mdx new file mode 100644 index 0000000000..2ed71f2efd --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/funnels.mdx @@ -0,0 +1,19 @@ +## Overview +Mixpanel’s Funnels allows you to examine how end-users perform events in a series. Funnels calculate and display the amount of users who convert from one event to another within a particular time window. This allows you to identify where your users drop off, what segments convert the most, and other important facets of the user journey. + + ++ +
+ +## Configuring Conversion Criteria + ++ +
+ +## Applying Advanced Data Functions + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/impact.mdx b/pages/tutorials/mixpanel-analysis/impact.mdx new file mode 100644 index 0000000000..219d6b8799 --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/impact.mdx @@ -0,0 +1,6 @@ +## Overview +Mixpanel’s Impact report measures the effects of product or marketing launches on your key metrics. Impact calculates the user adoption of the launch, the impact of the launch on an important event, and the differences between users that adopt the launch and those that do not. + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/insights.mdx b/pages/tutorials/mixpanel-analysis/insights.mdx new file mode 100644 index 0000000000..221fe65c3a --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/insights.mdx @@ -0,0 +1,25 @@ +## Overview +Insights is a powerful and flexible tool designed to visualize trends and compositions within your data. You can analyze events, cohorts, and user profiles, and display the data in a wide variety of chart types. + ++ +
+ +## Analyzing User Trends + ++ +
+ +## Applying Advanced Data Functions + ++ +
+ +## Visualizing User Cohorts and Profiles + ++ +
+ diff --git a/pages/tutorials/mixpanel-analysis/overview.md b/pages/tutorials/mixpanel-analysis/overview.md new file mode 100644 index 0000000000..657c0fa289 --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/overview.md @@ -0,0 +1,3 @@ +In this tutorial, we will explore the fundamentals of how Mixpanel works and highlight some of the key features to get you started. + +Log in to your Mixpanel account to follow along. Don't have an account yet? Get your free Mixpanel demo account [here](https://mixpanel.com/project/3/view/79/app/boards) to access the demo datasets. diff --git a/pages/tutorials/mixpanel-analysis/retention.mdx b/pages/tutorials/mixpanel-analysis/retention.mdx new file mode 100644 index 0000000000..99bb60e202 --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/retention.mdx @@ -0,0 +1,24 @@ +## Overview +The Retention report in Mixpanel is designed to assess user engagement over a specified period of time. Retention of your users is critical to achieving product-market fit and sustainable long-term growth, and this report will help you understand how long users continue to come back and find value from your product. + ++ +
+ +## Understanding Retention Criteria + ++ +
+ +## Interpreting Mixpanel Retention Report + ++ +
+ +## Retention Frequency Analysis + ++ +
diff --git a/pages/tutorials/mixpanel-analysis/signal.mdx b/pages/tutorials/mixpanel-analysis/signal.mdx new file mode 100644 index 0000000000..1729ac2b75 --- /dev/null +++ b/pages/tutorials/mixpanel-analysis/signal.mdx @@ -0,0 +1,6 @@ +## Overview +Signal measures the association between a correlation event and a goal event and quantifies the correlation between the two. This facilitates a deeper understanding of the behaviors that drive customer conversions, and can help guide product decisions. + ++ +
diff --git a/pages/tutorials/setting-up-mixpanel.md b/pages/tutorials/setting-up-mixpanel.md new file mode 100644 index 0000000000..fff694239d --- /dev/null +++ b/pages/tutorials/setting-up-mixpanel.md @@ -0,0 +1,65 @@ +## Setting Up Mixpanel + +### Mixpanel Organization +Each Mixpanel customer is assigned an [Organization](https://help.mixpanel.com/hc/en-us/articles/360020461952#organizations-introduction) which serves as the controlling entity for managing all your Mixpanel analytics needs. + +- [Pricing / Billing Plan](https://help.mixpanel.com/hc/en-us/categories/115000963103#billing-and-plans) - determines data volume limits and features available across all projects in the organization +- [Mixpanel Project(s)](https://help.mixpanel.com/hc/en-us/categories/115000963103#project-configuration) - container for product's analytics data (events, properties, user profiles, reports, etc.) +- [User Account(s)](https://help.mixpanel.com/hc/en-us/categories/115000963103#account-and-organization) - used to sign into Mixpanel given the appropriate role for organization and project level access +- Other organization settings - [teams](https://help.mixpanel.com/hc/en-us/articles/360020731831-Create-and-Manage-Teams), [service accounts](https://developer.mixpanel.com/reference/service-accounts), [access security (SSO/ 2FA)](https://help.mixpanel.com/hc/en-us/categories/115000963103#access-and-security), [data & privacy](https://help.mixpanel.com/hc/en-us/sections/115001299023-Data-Security-and-Privacy), etc. + +### Mixpanel Projects +Each Mixpanel organization contains one or more [Projects](https://help.mixpanel.com/hc/en-us/articles/115004505106-Create-and-Manage-Projects) that house events, properties, user profiles, and other reporting metadata that can be created with EU data residency if applicable. + +- [Timezone](https://help.mixpanel.com/hc/en-us/articles/115004547203-Manage-Timezones-for-Projects-in-Mixpanel) - [dates](https://help.mixpanel.com/hc/en-us/articles/115004547063#date) (including timestamps) are ingested in UTC and converted to the project’s configured timezone for reporting. +- Access Keys + - [Project Token](https://help.mixpanel.com/hc/en-us/articles/115004502806) - used solely for ingestion to identify (not authenticate) a project when collecting data in front-end implementations (client-side SDKs or Ingestion API) + - [API/Project Secret](https://help.mixpanel.com/hc/en-us/articles/115004490503#api-secret) - legacy authentication for importing and exporting data, Service Accounts are the preferred and should be used where possible as API SDecret will be deprecated over time +- Other project settings - [group keys](https://help.mixpanel.com/hc/en-us/articles/360025333632#implementation), [data views](https://help.mixpanel.com/hc/en-us/articles/360043782572), [service accounts](https://developer.mixpanel.com/reference/service-accounts), [public dashboard](https://help.mixpanel.com/hc/en-us/articles/4402022733844), [sessions](https://help.mixpanel.com/hc/en-us/articles/115004695223), etc. + +#### Create at least 2 Mixpanel Projects (Production and Development) +Mixpanel recommends tracking 1 product with multiple platforms (mobile, web, etc.) into one project, but [separate projects for development and production](https://help.mixpanel.com/hc/en-us/articles/360001354886-Automatically-Separate-Development-Data). There may be [factors](https://help.mixpanel.com/hc/en-us/articles/115004491683-When-To-Use-Multiple-Projects#factors-to-consider) where implementing separate projects is required, please refer to the Mixpanel Help. + + + +### Mixpanel User Accounts +Each Mixpanel user account belongs to an organization and may be assigned with multiple projects with varying permissions / roles. + +- [Organization Role](https://help.mixpanel.com/hc/en-us/articles/360025387911-Organization-Roles-and-Permissions) - each user will have a single organization role per organization + - Owner (at least one) - super user for the organization and all projects underneath + - Admin - manage projects, members, and roles in the organization (with [certain exceptions](https://help.mixpanel.com/hc/en-us/articles/360025387911-Organization-Roles-and-Permissions#admin)) + - Billing Admin - primarily for managing Billing Plans + - Member - *basic membership* for a user to have access to Project(s) and or Team(s) + +- [Project Role](https://help.mixpanel.com/hc/en-us/articles/360024613412-Project-Roles-and-Permissions-) - each user can have multiple project roles, where it conflicts [permissions are additive](https://help.mixpanel.com/hc/en-us/articles/360024613412-Project-Roles-and-Permissions-#having-multiple-roles-at-once) + - Owner - super user for the project, default for organization owners + - Admin - manage project (except delete, reset, and security) and members within, default for organization admins + - Analyst - create, save, edit reports + share and make public dashboards (*most common role for users*) + - Consumer - create, save, edit reports but unable to share or create public dashboards + +#### User Access Management Approach +There are two general approaches to user management in Mixpanel + + + +#### Using Mixpanel Teams +Mixpanel enables assignment of projects and project roles to groups of users called [Teams](https://help.mixpanel.com/hc/en-us/articles/360020731831-Create-and-Manage-Teams) with the flexibility to also assign such projects and project roles to individual user accounts if required. + + + +#### Basic User Account Setup +Organization Owners and Admins can assign projects or teams directly to user accounts at the organization level by minimally provisioning them with an organization Membership. + + + +Project Owners and Admins can be created to delegate access provisioning privileges at the project level. A [default project role](https://help.mixpanel.com/hc/en-us/articles/360020731811-Invite-and-Manage-Users#setting-a-default-role-on-a-project) can also be set for All Users in the Organization as a baseline access. Teams are not available at the project level. + + + +#### Single Sign-On (SSO) and 2FA +Mixpanel provides [Single Sign-On (SSO)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On) access to enterprise accounts using either an [Identity Provider (IDP)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On#set-up-your-idp) or a custom SAML implementation such as [Okta](https://help.mixpanel.com/hc/en-us/articles/115004474143) or [Microsoft Azure](https://help.mixpanel.com/hc/en-us/articles/360040323292). +- Enabling [Just in Time (JIT)](https://help.mixpanel.com/hc/en-us/articles/360036428871-Single-Sign-On#just-in-time-provisioning) provisioning using SAML removes the need for organization admins to invite individual users to an organization. +- IDPs (Okta, Onelogin, and Azure) that have auto-provisioning integrations with Mixpanel enables syncing of access provisioning and deprovisioning for users. +- To give provisioned users default access to projects, invite all users in the organization by [Setting a Default Role on a Project](https://help.mixpanel.com/hc/en-us/articles/360020731811-Invite-and-Manage-Users#setting-a-default-role-on-a-project). + +Mixpanel also provides [Two Factor Authentication (2FA)](https://help.mixpanel.com/hc/en-us/articles/115004485966-Two-Factor-Authentication-2FA-) feature requiring users to provide a security code sent via SMS to their configure mobile number to verify their identity. diff --git a/public/create-project-steps.png b/public/create-project-steps.png new file mode 100644 index 0000000000..dfc9efac22 Binary files /dev/null and b/public/create-project-steps.png differ diff --git a/public/org-level-user-setup.png b/public/org-level-user-setup.png new file mode 100644 index 0000000000..0e76cf1b4f Binary files /dev/null and b/public/org-level-user-setup.png differ diff --git a/public/project-level-user-steup.png b/public/project-level-user-steup.png new file mode 100644 index 0000000000..693d00bfb7 Binary files /dev/null and b/public/project-level-user-steup.png differ diff --git a/public/user-access-approach.png b/public/user-access-approach.png new file mode 100644 index 0000000000..047a9f3532 Binary files /dev/null and b/public/user-access-approach.png differ diff --git a/public/using-teams.png b/public/using-teams.png new file mode 100644 index 0000000000..bba98e842d Binary files /dev/null and b/public/using-teams.png differ