Socket
Socket
Sign inDemoInstall

universal-analytics

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-analytics - npm Package Compare versions

Comparing version 0.4.17 to 0.4.18

13

HISTORY.md
# 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 @@

4

package.json
{
"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 @@

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