Auth0 Logs to Mixpanel
The Auth0 Logs to Mixpanel is a scheduled job that takes all of your Auth0 logs and exports them to Mixpanel.
Step 1: Get the required information from Mixpanel
First you need to get some required information from Mixpanel: the Token and API Key that Auth0 will use to connect and push logs.
- Go to Mixpanel
- Click on your Account Settings
- Click on the Projects tab
- Copy the Token and API Key information. These map respectively to the MIXPANEL_TOKEN and MIXPANEL_KEY variables that you will set in the next step
Step 2: Configure Auth0
Go to Dashboard > Extensions and click on the Auth0 Logs to Mixpanel box in the list of provided extensions.
The Install Extension window pops open.
Set the following configuration variables:
- Schedule: The frequency with which logs should be exported. The schedule can be customized even further after creation.
- MIXPANEL_TOKEN: The Mixpanel Token for your mixpanel project to which the Auth0 logs will be exported.
- MIXPANEL_KEY: The Mixpanel API Key for your mixpanel project to which the Auth0 logs will be exported.
- BATCH_SIZE: The ammount of logs to be read on each execution. Maximun is 20.
- LOG_LEVEL: The minimal log level of events that you would like sent to Mixpanel.
- LOG_TYPES: The events for which logs should be exported. If you want you can send only events with a specific type (for example, failed logins).
Once you have provided this information, click the Install button to finish installing the extension.
Use your extension
To view all jobs, navigate to Dashboard > Extensions, click on the Installed Extensions link, and select the Auth0 Logs to Mixpanel line. There you can see the alls job and failed jobs. You can also view the logs of these runs.
You can create a cron webtask (that will run every 10 minutes) or view more details around existing cron webtasks. In the terminal, you can view details for each execution, reschedule, access realtime logs, and more.