Home
What is June?
Install

Users

Identify
Track behaviour

Companies

Identify
Track behaviour
Log in

Identify your 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 →

Overview

This document 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_url, name, role, etc. This information will appear on the user's profile and can be used to filter users in reports.

1
window.analytics.identify('USER_ID', {
2
email: 'test@example.com',
3
// Optional
4
name: 'Joe Bloggs',
5
avatar_url: '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 →