Docs

Troubleshooting Issues With ...

Send Logging Events to Segment

Segment provides a large number of analytics-related functionality with a single, simple to use API.

In this example, you will learn how to connect Auth0 to Segment and stream signup and login events. To implement this with Auth0, you just need to create one Rule in your pipeline.

Segment Flow

You'll be using Segment's Node.js library to record Auth0 data.

Login issues

1. Find your Segment Write Key

To configure this integration, you'll need your Segment Write Key. You can find this under Segment's Settings > API.

Segment API Keys

Is the user prompted for login credentials?

2. Record sign-up and log-in events in Segment

Create a rule to record user signup and login events for your apps and send the information to Segment using Segment's Node.js library.

In this example, we expect your Segment credentials to be stored in the global configuration object. Be sure to add your Write Key here before running your rule. Doing this allows you to use your key in multiple rules and prevents you from having to store it directly in the code.

Is an error message shown after entering credentials?

3. Check your integration

See if your integration works by checking the Segment Debugger to see if your Auth0 events are appearing.

Segment Debugger

Is a login session established for the user at the authorization server?

Keep reading

Check out our repository of Auth0 Rules for more great examples: