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

crowdstart-analytics

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crowdstart-analytics - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

18

lib/integrations/google-analytics.js
// Generated by CoffeeScript 1.9.3
var GoogleAnalytics, Integration, parseValue, payload,
var GoogleAnalytics, Integration, parseCurrency, parseValue, payload,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

@@ -19,2 +19,10 @@ hasProp = {}.hasOwnProperty;

parseCurrency = function(value) {
if (typeof value === 'string') {
return value;
} else if (typeof value === 'number') {
return value.toFixed(2);
}
};
payload = function(opts) {

@@ -69,3 +77,3 @@ var data, k, v;

name: props.name,
price: props.price,
price: parseCurrency(props.price),
quantity: props.quantity,

@@ -214,5 +222,5 @@ variant: props.variant

affiliation: props.affiliation,
revenue: (ref1 = props.total) != null ? ref1 : props.revenue,
tax: props.tax,
shipping: props.shipping,
revenue: parseCurrency((ref1 = props.total) != null ? ref1 : props.revenue),
tax: parseCurrency(props.tax),
shipping: parseCurrency(props.shipping),
coupon: props.coupon

@@ -219,0 +227,0 @@ });

{
"name": "crowdstart-analytics",
"version": "0.2.6",
"version": "0.2.7",
"description": "Analytics support for Crowdstart.",

@@ -5,0 +5,0 @@ "main": "lib",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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