Tracking groups
See what groups are doing inside your product
Groups
Have you started identifying your groups?
If you haven't implemented the .group call for groups, please do that first before implementing the .track method for groups.
Overview
This guide will teach you how to successfully track how your groups (workspaces, departments, projects, etc.) are being used in your product. You can associate events with multiple groups simultaneously, creating a hierarchy of relationships. For example, you can track an event that belongs to a specific workspace, department, and project all at once.
Note: If you have already implemented the .track call for users, you can just add the groups object within the properties with the right group types and group IDs. There is no need to add additional .track calls for groups.
Code
Replace USER_ID with your user identifier, and include a groups object within the properties with the right group types and group IDs. You can associate events with multiple group types by including their respective IDs.
window.analytics.track('signed_in', {
method: 'sso',
plan: 'enterprise',
groups: {
group: 'group_id',
department: 'department_id',
project: 'project_id'
}
});
analytics.track('signed_in', {
method: 'sso',
plan: 'enterprise',
groups: {
group: 'group_id',
department: 'department_id',
project: 'project_id'
}
});
analytics.track({
userId: 'USER_ID',
event: 'signed_in',
properties: {
method: 'sso',
plan: 'enterprise',
groups: {
group: 'group_id',
department: 'department_id',
project: 'project_id'
}
}
});
analytics.track(
user_id="USER_ID",
event="signed_in",
properties={
"method": "sso",
"plan": "enterprise",
"groups": {
"group": "group_id",
"department": "department_id",
"project": "project_id"
}
}
)
Analytics.track(
user_id: 'USER_ID',
event: 'signed_in',
properties: {
method: 'sso',
plan: 'enterprise',
groups: {
group: 'group_id',
department: 'department_id',
project: 'project_id'
}
}
)
curl https://api.june.so/sdk/track
-H "Content-Type: application/json"
-H "Authorization: Basic YOUR_WRITE_KEY"
-X POST
{
"userId": "USER_ID",
"event": "signed_in",
"properties": {
"method": "sso",
"plan": "enterprise",
"groups": {
"group": "group_id",
"department": "department_id",
"project": "project_id"
}
},
"timestamp": "2012-12-02T00:31:38.208Z"
}
Ready to jump into June?
Once you've implemented the SDK, you're ready to jump into June.