The functions in the bot.analytics namespace are used to send data to analytics platforms such as Mixpanel.
updateUserProfile(data)
Send additional attributes to a Mixpanel user profile.
You must have configured a Mixpanel integration.
Property | Type | Description |
---|---|---|
data | Object |
An object containing the additional attributes to send to Mixpanel as key-value pairs. If a key matches an existing property for that user profile, it will be overwritten with the new value. |
// Data object to send
let data = {
likesCheese: true,
favouriteColour: "green",
};
//Send the update
bot.analytics.updateUserProfile(data);
done();
For more information on Mixpanel user profiles, see the Mixpanel documentation.