Socket
Socket
Sign inDemoInstall

universal-analytics

Package Overview
Dependencies
4
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "universal-analytics",
"version": "0.1.0",
"version": "0.1.1",
"description": "A node module for Google's Universal Analytics tracking",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ universal-analytics

This module allows tracking data (or rather, users) from within a Node.js application. Tracking is initiated on the server side and, if required, does not required any more tracking in the browser.
This module allows tracking data (or rather, users) from within a Node.js application. Tracking is initiated on the server side and, if required, does not require any more tracking in the browser.

@@ -86,3 +86,3 @@ `universal-analytics` currently supports the following tracking features:

This code has the exact same effect as the one above. `dp`, `dt`, and `dh` (as in '**d**ocument **p**ath', '**d**ocument **t**itle' and '**d**ocument **h**ostname') are the attribute names used by the Measurement Protocol.
This code has the exact same effect as the one above. `dp`, `dt`, and `dh` (as in 'document path', 'document title' and 'document hostname') are the attribute names used by the Measurement Protocol.

@@ -101,10 +101,10 @@ The page path (or `dp`) is mandatory. Google Analytics can not track a pageview without a path. To avoid such erroneous requests, `universal-analytics` will deny `pageview()` tracking if the path is omitted.

* `Visitor#pageview(path)
* `Visitor#pageview(path, callback)
* `Visitor#pageview(params)
* `Visitor#pageview(params, callback)
* `Visitor#pageview(path, hostname)
* `Visitor#pageview(path, hostname, callback)
* `Visitor#pageview(path, hostname, title)
* `Visitor#pageview(path, hostname, title, callback)
* `Visitor#pageview(path)`
* `Visitor#pageview(path, callback)`
* `Visitor#pageview(params)`
* `Visitor#pageview(params, callback)`
* `Visitor#pageview(path, hostname)`
* `Visitor#pageview(path, hostname, callback)`
* `Visitor#pageview(path, hostname, title)`
* `Visitor#pageview(path, hostname, title, callback)`

@@ -158,2 +158,12 @@ ## Event tracking

The category (`ec`) and the action (`ea`) are mandatory. Google Analytics will not track an event without them. To avoid such erroneous requests, universal-analytics will deny `event()` tracking if either attribute is omitted.
```javascript
var action = null;
visitor.event("Navigation clicks", action, function (err) {
// This callback will receive an error
});
```
The following method signatures are available for #event:

@@ -253,3 +263,12 @@

The transaction ID (`ti`) is mandatory for both the transaction and the item. Google Analytics will not track e-commerce data without it. To avoid such erroneous requests, universal-analytics will deny `transaction()` and `item()` tracking if it is omitted.
```javascript
var ti = null;
visitor.transaction(ti, function (err) {
// This callback will receive an error
});
```
The following method signatures are available for #transaction:

@@ -256,0 +275,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc