Companies are a concept which let you group users together. A company can be an organization, account, project, team or any other grouping is relevant for you.

Grouping users together into a company can help you unlock company level analytics to answer questions like:

  • How many companies signed up last month

  • How many companies are using your product daily

  • How many companies are retaining week over week

To get started with company level analytics in June, you need to send us information about the companies using your product.

GROUP call

The GROUP call is similar to the identify call, the only difference being that it helps you identify companies inside of your product instead of individual users.

An example from our SDK docs:

# python

analytics.group(
user_id="019mr8mf4r",
group_id="56",
traits={
"avatar": "http://ac1.googleusercontent.com",
"name": "Acme",
"description": "Entertainment"
},
)

Here, the user_id and group_id are unique identifiers of a user and a company in your database.

You can also send us traits with a GROUP call, which we use to populate that company's profile in June:

Companies profile

If your users can belong to only one company, then a GROUP call is all you need to use company analytics in June, and you can stop reading here.

Read further if your users can belong to multiple companies.


If your users can belong to multiple companies (for example, if your product is similar to Slack or GitHub), you'll need to tie their events to the company in which they're performing them.

Group context

The Group context (based on the Segment B2B SaaS spec) can used to tie an event performed by a user to a specific company.

To do so, you just need to send the unique identifier of that company as a groupId in the context of your Track calls.

An example from our SDK docs:

# python

analytics.track(
user_id="019mr8mf4r",
event="Created Account",
properties={"plan": "Pro"},
context={"groupId": "56"},
)

That's it! With the GROUP call and the Group context, you're all set to harness the power of company analytics in June.

Did this answer your question?