Groups & Companies
Roll users up into accounts — associate people with companies (or any group type), then analyze usage, members, and revenue per account in the Companies dashboard.
For B2B products, the unit that matters is often the account, not the individual. Logspot lets you group users into companies (or any group type) so you can answer "which accounts are most active?", "who are the people inside Acme?", and "what's revenue by company?".
Groups build on identity. Read Identify Users & Profiles first — a group associates a person (or an anonymous visitor, promoted on identify) with an account.
Associate a User with a Company
There are two ways to tie a user to a group.
1. The Group API (Recommended for Traits)
Send a group call from your backend to create/update a company and attach a member. Use it when you want to set company traits (name, plan, domain, …):
curl -X POST https://api.logspot.io/group \
-H "x-logspot-sk: sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"group_id": "acme.com",
"type": "company",
"user_id": "user_123",
"traits": { "name": "Acme, Inc.", "plan": "enterprise" }
}'group_id— a stable key for the account (a domain likeacme.comis a common choice).type— the group type; defaults tocompany.user_id(oranonymous_id) — the member to attach. If the visitor isn't identified yet, the membership attaches to their anonymous ID and is promoted to the person when theyidentify().traits— properties on the account (anameshows in the dashboard).
See API Authentication for keys.
2. Inline on a Track Event
Any track call can carry groupId and groupType to associate that event (and
its user) with an account in the same call, from the browser SDK or your backend:
Logspot.track({
event: 'Project Created',
userId: 'user_123',
groupId: 'acme.com',
groupType: 'company',
});Posting directly to the raw Track API uses
the snake_case group_id / group_type fields with your secret key.
The browser and Node SDKs also expose a
group()helper, e.g.Logspot.group('acme.com', { plan: 'pro' }), which creates or updates a membership without emitting an event.
Group Types
company is the default and the right choice for most B2B accounts. You can
define additional group types (e.g. workspace, team) under
Settings → Groups, then pass that key as type / group_type. The
Playground group form lets you pick from your
configured types.
The Companies Dashboard
Once associations are flowing, the Companies section gives you per-account analytics:
- Companies list — every account, sortable by users, events, last active, or revenue.
- Company detail — headline tiles (users, events, members, revenue, last active), revenue over time, a Members table (the identified people in the account, with role and last seen), Top users (most active people by event count, linked to their profiles), and an Activity feed.