Integrate with Mixpanel Product Analytics

Integrate with Mixpanel Product Analytics

To help convert, engage, and retain users, you may want to integrate with Mixpanel Product Analytics. You can do this using a specialized rule template.

In this example, we will use a rule to send a sign-in event to Mixpanel and will include the application to which the user is logging in as a property.

Prerequisites

Before connecting your Auth0 app to Mixpanel, you must sign up for and configure your account with Mixpanel.

Steps

To connect your app to Mixpanel, you will:

  1. Get your Mixpanel credentials

  2. Create and activate a rule in Auth0

Get your Mixpanel credentials

First, you will need to retrieve the URL of Mixpanel's API and your API Token. To learn more, read Mixpanel's Ingestion API HTTP spec.

Once you have retrieved the Mixpanel API's URL and your API Token, keep these values on hand because we will use them in the next step.

Create and activate a rule in Auth0

Set up a rule in Auth0. While setting up your rule, select the Tracks Logins in Mixpanel template from the Webhook section, then use the following settings:

Variable Value
url Mixpanel API URL
token Mixpanel API Token

By default, your rule will be activated upon save.