Comparing version 0.3.1 to 0.3.2
@@ -569,3 +569,3 @@ /* | ||
var data = { | ||
'$delete': distinct_id, | ||
'$delete': '', | ||
'$token': metrics.token, | ||
@@ -572,0 +572,0 @@ '$distinct_id': distinct_id |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"homepage": "https://github.com/mixpanel/mixpanel-node", | ||
@@ -26,3 +26,3 @@ "author": "Carl Sverre", | ||
"scripts": { | ||
"test": "bin/run_tests" | ||
"test": "nodeunit" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -42,2 +42,10 @@ Mixpanel-node | ||
// create or update a user in Mixpanel Engage without altering $last_seen | ||
// - pass option `$ignore_time: true` to prevent the $last_seen property from being updated | ||
mixpanel.people.set("billybob", { | ||
plan: "premium", | ||
games_played: 1, | ||
$ignore_time: true | ||
}); | ||
// set a single property on a user | ||
@@ -118,2 +126,22 @@ mixpanel.people.set("billybob", "plan", "free"); | ||
FAQ | ||
--- | ||
**Where is `mixpanel.identify()`?** | ||
`mixpanel-node` is a server-side library, optimized for stateless shared usage; e.g., | ||
in a web application, the same mixpanel instance is used across requests for all users. | ||
Rather than setting a `distinct_id` through `identify()` calls like Mixpanel client-side | ||
libraries (where a single Mixpanel instance is tied to a single user), this library | ||
requires you to pass the `distinct_id` with every tracking call. See | ||
https://github.com/mixpanel/mixpanel-node/issues/13. | ||
**How do I get or set superproperties?** | ||
See the previous answer: the library does not maintain user state internally and so has | ||
no concept of superproperties for individual users. If you wish to preserve properties | ||
for users between requests, you will need to load these properties from a source specific | ||
to your app (e.g., your session store or database) and pass them explicitly with each | ||
tracking call. | ||
Tests | ||
@@ -151,2 +179,4 @@ ----- | ||
- [Michael G](https://github.com/gmichael225) | ||
- [Tejas Manohar](https://github.com/tejasmanohar) | ||
- [Eelke Boezeman](https://github.com/godspeedelbow) | ||
@@ -153,0 +183,0 @@ License |
@@ -348,3 +348,3 @@ var Mixpanel = require('../lib/mixpanel-node'), | ||
var expected_data = { | ||
$delete: this.distinct_id, | ||
$delete: '', | ||
$token: this.token, | ||
@@ -351,0 +351,0 @@ $distinct_id: this.distinct_id |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68225
185
14