resin-universal-ga
Advanced tools
@@ -0,3 +1,11 @@ | ||
## 1.2.2 | ||
* Conditionally load GA script to prevent dupes | ||
## 1.2.1 | ||
* Send page views as pageviews instead of events, connects to #24 | ||
## 1.1.0 | ||
* Return rejected promises from the GA methods instead of throwing (prevents unhandled errors in the downstream code) |
{ | ||
"name": "resin-universal-ga", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A CommonJS wrapper for both Node.js and browser (async) version of Google Analytics library", | ||
@@ -5,0 +5,0 @@ "main": "src/node.js", |
@@ -1,2 +0,4 @@ | ||
require('./ga-loader') | ||
if (window.ga === undefined) { | ||
require('./ga-loader') | ||
} | ||
@@ -26,3 +28,3 @@ var Promise = require('bluebird') | ||
this.boot() | ||
ga(TRACKER_NAME + '.set', 'userId', userId) | ||
window.ga(TRACKER_NAME + '.set', 'userId', userId) | ||
}, | ||
@@ -29,0 +31,0 @@ logout: function () { |
4243
4.35%107
1.9%