avo-amplitude-js
Advanced tools
Comparing version 1.1.0 to 1.2.0-beta1
18
index.js
var amplitude = require('amplitude-js'); | ||
var apiKey; | ||
exports.init = function init(key) { | ||
exports.init = function init(key, options, cb) { | ||
apiKey = key; | ||
amplitude.getInstance(apiKey).init(apiKey); | ||
amplitude.getInstance(apiKey).init(apiKey, null, options, cb); | ||
}; | ||
exports.client = amplitude; | ||
exports.lib = amplitude; | ||
exports.getClient = function getClient() { | ||
return amplitude.getInstance(apiKey); | ||
}; | ||
exports.logEventWithUserProperties = function logEventWithUserProperties( | ||
@@ -41,3 +45,3 @@ eventName, | ||
amplitude.logRevenueV2(revenue); | ||
amplitude.getInstance(apiKey).logRevenueV2(revenue); | ||
} | ||
@@ -61,8 +65,8 @@ | ||
exports.setUserId = function setUserId(userId) { | ||
exports.identify = function identify(userId) { | ||
amplitude.getInstance(apiKey).setUserId(userId); | ||
}; | ||
exports.setUserProperties = function setUserProperties(userProperties) { | ||
amplitude.getInstance(apiKey).setUserProperties(userProperties); | ||
exports.unidentify = function unidentify() { | ||
amplitude.getInstance(apiKey).identify(null); | ||
}; |
{ | ||
"name": "avo-amplitude-js", | ||
"version": "1.1.0", | ||
"version": "1.2.0-beta1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2161
60
2