Log in

Identify users

See which users are using your product

Have you installed the June SDK?

If you haven't installed one of the June SDKs, please do that first before implementing the .identify method.

See how to install the June SDK →

Users

Overview

This section provides guidance on using the identify method to successfully identify your product's users. This will show you which users are triggering events in June. It is recommended to include this code snippet in the section of your code where user sign-ups, logins, or account details updates are handled.

Code

Replace USER_ID with a unique identifier, preferably the user ID from your database. Including the user's email is also suggested, along with any additional "traits" like avatar, name, role, etc. This information will appear on the user's profile and can be used to filter users in reports.

💡 Not sure which traits to add? We automatically map some standard ones: check out our guide

1
window.analytics.identify('USER_ID', {
3
// Optional
4
name: 'Joe Bloggs',
5
avatar: 'https://avatar.com/asd809sdhoif9as10nc29.png'
6
// Add anything else about the user here
7
});

Next: Track user behaviour

Once you've implemented the identify method in your codebase, it's time to track what your users are doing in your product.

See how to track user behaviour →