analytics.js-integrations icon indicating copy to clipboard operation
analytics.js-integrations copied to clipboard

Mixpanel Integration Group Properties can't be overwritten due to .set_once() call

Open rpatel05 opened this issue 3 years ago • 0 comments

https://github.com/segmentio/analytics.js-integrations/blob/1f21d51f34a752429dd3e95a9911169aa037407b/integrations/mixpanel/lib/index.js#L339-L345

Mixpanel integration Group properties call is passed in as set_once(traits) making it so that group props can never be overwritten if the value changes. Suggest changing it to a .set(traits) call or I know a Segment team member considered adding a toggle such as:

if (useSetInGroupCalls === true) {
        window.mixpanel
        .get_group(groupIdentifierTraits[ind], groupId)
        .set(traits);
} else {
      window.mixpanel
        .get_group(groupIdentifierTraits[ind], groupId)
        .set_once(traits);
}

rpatel05 avatar Jul 01 '22 17:07 rpatel05