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

g-analytics

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-analytics - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

13

lib/index.js
var
Request = require("request"),
_ = require("lodash");
_ = require("lodash"),
util = require("util"),
EventEmitter = require("events");

@@ -12,2 +14,3 @@ /**

var Client = function(trackingId, options) {
EventEmitter.call(this);
this._trackingId = trackingId;

@@ -31,10 +34,16 @@ this._analyticsHost = "www.google-analytics.com";

Client.prototype.send = function(params, cb) {
var self = this;
params.tid = this._trackingId;
params.v = 1;
this._request.post({
var req = this._request.post({
url: this._options.protocol + "://" + this._analyticsHost + "/collect",
form: params
}, cb);
req.on("error", function(err) {
self.emit("error", err);
});
};
util.inherits(Client, EventEmitter);
module.exports = Client;

5

package.json
{
"name": "g-analytics",
"version": "0.3.0",
"version": "0.3.1",
"description": "Ease to use nodejs google analytics client, which uses Measurement Protocol",

@@ -22,2 +22,5 @@ "main": "index.js",

},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"keywords": [

@@ -24,0 +27,0 @@ "google",

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