Comparing version 3.5.0 to 4.0.0
{ | ||
"name": "amplitude", | ||
"version": "3.5.0", | ||
"version": "4.0.0", | ||
"description": "A node wrapper for Amplitude analytics http api", | ||
@@ -35,8 +35,5 @@ "author": "Blade Barringer <blade@crookedneighbor.com>", | ||
"scripts": { | ||
"prepublish-please": "npm test", | ||
"prepublish": "publish-please guard", | ||
"contributors": "node tasks/generate-contributors-list", | ||
"lint": "standard *.js test/*.js | snazzy", | ||
"test": "npm run lint && mocha", | ||
"publish-please": "publish-please" | ||
"test": "npm run lint && mocha" | ||
}, | ||
@@ -56,15 +53,14 @@ "main": "amplitude.js", | ||
"dependencies": { | ||
"superagent": "^3.3.1" | ||
"superagent": "^5.1.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.0.0", | ||
"chai": "^4.1.0", | ||
"ecmascript-version-detector": "^1.0.3", | ||
"glob": "^7.1.1", | ||
"mocha": "^3.0.0", | ||
"nock": "9.0.2", | ||
"publish-please": "^2.1.4", | ||
"sinon": "^1.17.6", | ||
"sinon-chai": "^2.8.0", | ||
"snazzy": "^6.0.0", | ||
"standard": "^10.0.0" | ||
"glob": "^7.1.4", | ||
"mocha": "^6.2.0", | ||
"nock": "^10.0.6", | ||
"sinon": "^7.3.2", | ||
"sinon-chai": "^3.0.0", | ||
"snazzy": "^8.0.0", | ||
"standard": "^13.1.0" | ||
}, | ||
@@ -84,3 +80,8 @@ "license": "ISC", | ||
] | ||
}, | ||
"greenkeeper": { | ||
"ignore": [ | ||
"nock" | ||
] | ||
} | ||
} |
@@ -115,2 +115,25 @@ # amplitude | ||
With this method, you can also [modify user properties using property operations](https://amplitude.zendesk.com/hc/en-us/articles/205406617-Identify-API-Modify-User-Properties#keys-for-the-identification-argument). | ||
```javascript | ||
var data = { | ||
user_id: 'some id', // only required if device id is not passed in | ||
device_id: 'some id', // only required if user id is not passed in | ||
user_properties: { | ||
$set: { | ||
//... | ||
}, | ||
$add: { | ||
//... | ||
}, | ||
$append: { | ||
//... | ||
} | ||
} | ||
}; | ||
amplitude.identify(data); | ||
``` | ||
Note the limitation of mixing user property operations with top level properties. If you use any property operations (`$add`, `$append`, etc.), and you want to set a user property, it must be done using the `$set` operation. | ||
### CamelCase Data | ||
@@ -117,0 +140,0 @@ |
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
17260
9
365
+ Addeddebug@4.3.7(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedform-data@3.0.1(transitive)
+ Addedmime@2.6.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedsuperagent@5.3.1(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@3.2.7(transitive)
- Removedextend@3.0.2(transitive)
- Removedform-data@2.5.1(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmime@1.6.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsuperagent@3.8.3(transitive)
Updatedsuperagent@^5.1.0