mixpanel-node icon indicating copy to clipboard operation
mixpanel-node copied to clipboard

$-prefix

Open monowerker opened this issue 9 years ago • 1 comments

In the example you have:

// create or update a user in Mixpanel Engage
mixpanel.people.set("billybob", {
    $first_name: "Billy",
    $last_name: "Bob",
    $created: (new Date('jan 1 2013')).toISOString(),
    plan: "premium",
    games_played: 1,
    points: 0
});

Why are some keys prefixed with $? I'm guessing these are special to the mixpanel platform, what would the result be if I left out the $-prefix by mistake?

monowerker avatar Feb 25 '16 09:02 monowerker

Hi Mono!

The consequence of leaving out the $ prefix would be the special fields that utilize these keys would go unpopulated in a user profile in Mixpanel. For example, leaving out the prefix from the '$name' key means the name at the top of a user profile wouldn't display the user's name. You can see what I mean in the attached image.

noprefixprops

jamespotts avatar Nov 14 '17 18:11 jamespotts