Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

avo-amplitude-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avo-amplitude-js - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

35

index.js

@@ -25,2 +25,37 @@ var amplitude = require('amplitude-js');

function _logRevenue(productId, quantity, price, revenueType, eventProperties) {
var revenue = new amplitude.Revenue().setQuantity(quantity).setPrice(price);
if (productId !== null && productId !== undefined && productId.length !== 0) {
revenue.setProductId(productId);
}
if (
revenueType !== null &&
revenueType !== undefined &&
revenueType.length !== 0
) {
revenue.setRevenueType(revenueType);
}
if (eventProperties !== null && eventProperties !== undefined) {
revenue.setEventProperties(eventProperties);
}
amplitude.logRevenueV2(revenue);
}
exports.logRevenueWithUserProperties = function logRevenueWithUserProperties(
productId,
quantity,
price,
revenueType,
eventProperties,
userProperties
) {
if (userProperties !== null && userProperties !== undefined) {
amplitude.getInstance(apiKey).setUserProperties(userProperties);
}
_logRevenue(productId, quantity, price, revenueType, eventProperties);
};
exports.logRevenue = _logRevenue;
exports.setUserId = function setUserId(userId) {

@@ -27,0 +62,0 @@ amplitude.getInstance(apiKey).setUserId(userId);

2

package.json
{
"name": "avo-amplitude-js",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc