Amplitude-TypeScript icon indicating copy to clipboard operation
Amplitude-TypeScript copied to clipboard

Group identify is not working

Open jakubzitny opened this issue 2 years ago • 4 comments

The group tracking (assigning a group, group properties) does not add data to the events in Amplitude.

Expected Behavior

The following code should add data to groups and group_properties field of tracked events, but it does not do that.

amplitude.setGroup('Workspace', workspaceId)
const groupIdentity = new amplitude.Identify()
groupIdentity.set('workspaceId', workspaceId)
amplitude.groupIdentify('Workspace', workspaceId, groupIdentity, {
  user_id: userId,
})

amplitude.track('CTA click', eventProperties, {
  user_id: userId,
})

Current Behavior

Since this new library is finally something for JS/Node that has implicitly documented group behavior, I thought it will work better or be less verbose than the older libraries. It turns out there is no group info getting to amplitude. Is there anything that I am missing?

There is nothing in groups and group properties in raw event data: Screenshot 2022-08-22 at 13 46 26

There is no Group name (Group Type) in Account lookup Screenshot 2022-08-22 at 13 45 07

Possible Solution

I don't know the culprit here, the whole group identity setup is pretty complex, all Amplitude client libraries do it differently, Segment does it differently. I am not sure if the mistake here is just in how the API is being called or there is some functionality not implemented yet.

Steps to Reproduce

  1. Run the code above.
  2. Check raw event data in amplitude.

Environment

  • JS SDK Version: 0.4.0
  • Installation Method: Yarn (3)
  • Browser and Version: Brave 1.42.88

jakubzitny avatar Aug 22 '22 11:08 jakubzitny

Hi @jakubzitny Thank you for reporting bug. I'll look into it.

bohan-amplitude avatar Aug 26 '22 21:08 bohan-amplitude

@jakubzitny Just want to confirm, Did your org purchas account add-on? Group and Group properties are features that need to enable by account add-on.

bohan-amplitude avatar Aug 29 '22 16:08 bohan-amplitude

Yes, of course @bohan-amplitude. Thanks for looking into this.

jakubzitny avatar Sep 06 '22 00:09 jakubzitny

Hi @jakubzitny, wanted to reach out to you with regards to this issue. I am now seeing through your account that you have been able to instrument group and group properties to amplitude using the Node SDK. Is this an accurate? Feel free to share any findings you had with regards to this issue and also let us know if there are any other support we can provide. Thank you so much.

kevinpagtakhan avatar Jan 11 '23 09:01 kevinpagtakhan