Hi all, I'm using open source and sending all even...
# support
s
Hi all, I'm using open source and sending all events to a database where I can analyse them. I've noticed that when I use the group call, I get a groupId associated with the call, however the track and page events that follow from the same user do not have the groupId associated with them. Is there anyway to have the groupId associated with everything that happens after the group call, similar to how it works for identify?
q
The
groupId
is set for the duration of the
group
call. It is not automatically associated with subsequent
track
or
page
events from the same user. You can manually propagate the
groupId
to subsequent events by including it in the event properties. 1. When making the
group
call, retrieve the
groupId
from the response or generate a unique identifier for the group. 2. Store the
groupId
in a variable or any accessible scope. 3. When making subsequent
track
or
page
calls, include the
groupId
in the event properties under a suitable key. For example, you can use a property like
group_id
or any other key that aligns with your event schema.
s
Thanks @quiet-wolf-72320, what is the point of the group call then? It sounds like its just behaving like a track call
q
The
group
call is used to associate a user with a group or organization. It allows you to group individual users under a common identifier, such as an account, company, team, or any other logical grouping. Take a look at his https://www.rudderstack.com/docs/event-spec/standard-events/group/ What you are trying to do is group multiple event types for a particular user.
s
Thanks @quiet-wolf-72320, but I could do that with a track event? If the only thing that's happening is a group id is pushed along side a user id, thats the same as a track event