(groupId, traits = {}, options = {}, callback)
| 47 | methods: { |
| 48 | // Segment group call https://segment.com/docs/connections/sources/catalog/libraries/server/node/#group |
| 49 | group(groupId, traits = {}, options = {}, callback) { |
| 50 | const analyticsInstance = this.instance |
| 51 | const user = analyticsInstance.user() |
| 52 | const userId = options.userId || user.userId |
| 53 | const anonymousId = options.anonymousId || user.anonymousId |
| 54 | client.group({ |
| 55 | ...(anonymousId ? { anonymousId } : {}), |
| 56 | ...(userId ? { userId } : {}), |
| 57 | groupId: groupId, |
| 58 | traits: traits, |
| 59 | }, callback) |
| 60 | }, |
| 61 | // Function for using analytics-node client in other methods |
| 62 | getClient: () => client, |
| 63 | }, |
nothing calls this directly
no outgoing calls
no test coverage detected