universal-analytics
Advanced tools
Comparing version 0.4.17 to 0.4.18
# History | ||
## 0.4.18 | ||
- Fixed package-lock.json bug | ||
- Updated request package | ||
## 0.4.17 | ||
- Default to `https` instead of `http` when submitting data to Google Analytics | ||
- Switched from custom debugger to [debug](https://www.npmjs.com/package/debug) module | ||
Deprecated: | ||
- `.debug()` is now deprecated in favor of setting the DEBUG environment variable: `DEBUG=universal-analytics` | ||
## 0.4.16 | ||
@@ -4,0 +17,0 @@ |
{ | ||
"name": "universal-analytics", | ||
"version": "0.4.17", | ||
"version": "0.4.18", | ||
"description": "A node module for Google's Universal Analytics tracking", | ||
@@ -21,3 +21,3 @@ "main": "index.js", | ||
"debug": "^3.0.0", | ||
"request": "2.86.0", | ||
"request": "^2.86.0", | ||
"uuid": "^3.0.0" | ||
@@ -24,0 +24,0 @@ }, |
@@ -8,3 +8,3 @@ universal-analytics | ||
[![Build Status](https://travis-ci.org/peaksandpies/universal-analytics.png?branch=master)](https://travis-ci.org/peaksandpies/universal-analytics) | ||
[![npm version](https://badge.fury.io/js/universal-analytics.svg)](https://www.npmjs.com/package/universal-analytics) [![Build Status](https://travis-ci.org/peaksandpies/universal-analytics.png?branch=master)](https://travis-ci.org/peaksandpies/universal-analytics) | ||
@@ -25,2 +25,3 @@ | ||
- [Setting persistent parameters](#setting-persistent-parameters) | ||
- [Filter application tracking data](#filter-application-tracking-data) | ||
- [Session-based identification](#session-based-identification) | ||
@@ -43,2 +44,5 @@ - [Debug mode](#debug-mode) | ||
var ua = require('universal-analytics'); | ||
// Or with ES6 import | ||
import ua from 'universal-analytics' | ||
``` | ||
@@ -69,2 +73,9 @@ | ||
If you want to set User Id you can add it into options: | ||
```javascript | ||
var visitor = ua('UA-XXXX-XX', {uid: 'as8eknlll'}); | ||
``` | ||
[see about User Id](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#uid) | ||
Tracking a pageview without much else is now very simple: | ||
@@ -523,2 +534,14 @@ | ||
# Filter application tracking data | ||
Set a persistent parameter for [`Data Source`](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ds) to `app` in order to mark tracking data as `Application`. | ||
```javascript | ||
visitor.set("ds", "app"); // Allows filtering by the 'Application?' field in GA | ||
``` | ||
Then create a new view in Google Analytics of type 'Application'. You will then need to filter the data for that view by creating a new filter that either includes or excludes `Application? Yes` (depending on if you want to show(includes) or hide(excludes) application analytics in a given view). | ||
![Google Analytics Setup](https://i.imgur.com/ZDZ3ZPO.png) | ||
# Session-based identification | ||
@@ -525,0 +548,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166921
653
+ Addedajv@6.12.6(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedpsl@1.9.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addeduri-js@4.4.1(transitive)
- Removedajv@5.5.2(transitive)
- Removedboom@4.3.15.3.3(transitive)
- Removedco@4.6.0(transitive)
- Removedcryptiles@3.2.1(transitive)
- Removedfast-deep-equal@1.1.0(transitive)
- Removedhar-validator@5.0.3(transitive)
- Removedhawk@6.0.2(transitive)
- Removedhoek@4.3.1(transitive)
- Removedjson-schema-traverse@0.3.1(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedrequest@2.86.0(transitive)
- Removedsntp@2.1.0(transitive)
- Removedtough-cookie@2.3.4(transitive)
Updatedrequest@^2.86.0