Home
What is June?
Install

Users

Identify
Track behaviour

Companies

Identify
Track behaviour
Log in

Tracking company behaviour

See what companies are doing inside your product

Have you started identifying your companies?

If you haven't implemented the .group call, please do that first before implementing the .track method for companies.

See how to identify companies →

Overview

This guide will teach you how to successfully track how your companies are using your product. It's almost identical to tracking user behaviour with the exception of one change.

When triggering track events for a company, you should pass the unique ID (GROUP_ID) for the company in the context object of the .track method. See the code example below.

Note: If you have already implemented the .track call for users, you can just add the context object with the GROUP_ID. There is no need to add additional .track calls for companies.

Code

Replace USER_ID & GROUP_ID with your own unique identified, ideally the user and workspace ID from your database.

In the following example, it's important to call the .identify call before the .group call, because the .group call will attach the current identified user.

1
window.analytics.track('Signed In', {
2
browser: 'chrome'
3
}, {
4
// Add the GROUP_ID here to track this event on behalf of a company
5
{ context: { groupId: 'GROUP_ID' } }
6
});

Jump into June

Once you've implemented the .identify, .group and .track method and are sending track events, you're ready to jump into June.