segmentio / segmentio/analytics.js-integrations

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

Open
#686 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Description

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);
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at integrations/mixpanel/lib/index.js lines 339-345 and inspect how Group properties are passed to Mixpanel. Compare the current set_once(traits) behavior with the proposed set(traits) behavior, including whether a toggle is required. Done means changed group properties can be overwritten while the intended existing behavior remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
analytics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.