Segment.group()

Associate a user with a group, like an account or an organization.

Usage

Hover over inputs/exits for more info.

var Segment = require('machinepack-segment');


// Associate a user with a group, like an account or an organization.

Segment.group({

writeKey: 'C3ut91L4284abn2VdaJ2813Zc193042Kl4',

userId: '019mr8mf4r',

groupId: '8e9df332ac',

traits: {},

integrations: {},

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

writeKey required

The "write key" associated with your Segment account.

'C3ut91L4284abn2VdaJ2813Zc193042Kl4'
userId required

A unique identifier for the user who performed this action.

'019mr8mf4r'
groupId required

A unique identifier for the group who this user is categorized as.

'8e9df332ac'
traits required

A free-form dictionary of traits about the user, like "email" or "name".

integrations

A dictionary of Segment integrations to either enable or disable.

Exits

error

An unexpected error occurred.

success

OK.