question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

Is there any plan to integrate mixpanel.identify

https://mixpanel.com/docs/getting-started/learn-the-basics

I am trying to track an event related to another user, so I want to identify them in my code with something like this

mixpanel.track 'ReferralClicked'
  objectId: req.body.objectId

Thanks, Bob

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
adelespinassecommented, Nov 29, 2016

@mividtim Saying you need to set $distinct_id is misleading (or possibly the library has changed since you wrote that). You actually need to pass the distinct_id value as the first parameter of people.set, and other properties in the second parameter. So don’t do:

mixpanel.people.set({
  $distinct_id: userId,
  name: name
});

Do this instead:

mixpanel.people.set(
  userId,
  { name: name }
);

I wish the documentation was more clear about the differences between this package and mixpanel-browser. The only place it’s really clear is in the code itself:

https://github.com/mixpanel/mixpanel-node/blob/master/lib/mixpanel-node.js#L352

3reactions
mividtimcommented, Mar 22, 2016

I just found in the docs that I should be setting the $distinct_id property, not distinct_id, on people.set calls. It would be great if the README included this property in the user-creation example. There is really no circumstance I can think of using this Node library where you wouldn’t want to specify your own. Otherwise, how would you know what value to use on subsequent tracking calls? You wouldn’t be able to figure out the ID mixpanel created, since you have no user context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify Definition & Meaning - Dictionary.com
to recognize or establish as being a particular person or thing; verify the identity of: to identify handwriting; to identify the bearer of...
Read more >
Identify Definition & Meaning - Merriam-Webster
1 · to think of as united (as in spirit or principle). groups identified with conservation ; 2 · to find out or...
Read more >
IDENTIFY | definition in the Cambridge English Dictionary
to recognize someone or something and say or prove who or what that person or thing is: Even the smallest baby can identify...
Read more >
31 Synonyms & Antonyms for IDENTIFY - Thesaurus.com
establish (who someone is), as in He has been identified/established as the main suspect. Relatedly, to identify someone is to figure out who...
Read more >
identify - Wiktionary
VerbEdit · (transitive) To establish the identity of someone or something. · (transitive) To disclose the identity of someone. · (transitive, biology) To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found