From cc9d522691245a13959dca24c280abc041e85243 Mon Sep 17 00:00:00 2001 From: Andreas Bernard Date: Thu, 17 May 2018 21:50:51 +0200 Subject: [PATCH] Add anonymizeIp as option (#29) --- dist/amd/analytics.js | 6 +++++- dist/analytics.js | 6 +++++- dist/commonjs/analytics.js | 6 +++++- dist/system/analytics.js | 6 +++++- src/analytics.js | 6 +++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dist/amd/analytics.js b/dist/amd/analytics.js index d431080..54ce52f 100644 --- a/dist/amd/analytics.js +++ b/dist/amd/analytics.js @@ -75,6 +75,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-event-aggregator', ' logging: { enabled: true }, + anonymizeIp: { + enabled: false + }, pageTracking: { enabled: false, getTitle: function getTitle(payload) { @@ -255,7 +258,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-event-aggregator', ' ga('set', { page: path, - title: title + title: title, + anonymizeIp: this._options.anonymizeIp.enabled }); ga('send', 'pageview'); }; diff --git a/dist/analytics.js b/dist/analytics.js index d431080..54ce52f 100644 --- a/dist/analytics.js +++ b/dist/analytics.js @@ -75,6 +75,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-event-aggregator', ' logging: { enabled: true }, + anonymizeIp: { + enabled: false + }, pageTracking: { enabled: false, getTitle: function getTitle(payload) { @@ -255,7 +258,8 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-event-aggregator', ' ga('set', { page: path, - title: title + title: title, + anonymizeIp: this._options.anonymizeIp.enabled }); ga('send', 'pageview'); }; diff --git a/dist/commonjs/analytics.js b/dist/commonjs/analytics.js index 3b2ff74..c561bdc 100644 --- a/dist/commonjs/analytics.js +++ b/dist/commonjs/analytics.js @@ -56,6 +56,9 @@ var defaultOptions = { logging: { enabled: true }, + anonymizeIp: { + enabled: false + }, pageTracking: { enabled: false, getTitle: function getTitle(payload) { @@ -236,7 +239,8 @@ var Analytics = exports.Analytics = (_dec = (0, _aureliaDependencyInjection.inje ga('set', { page: path, - title: title + title: title, + anonymizeIp: this._options.anonymizeIp.enabled }); ga('send', 'pageview'); }; diff --git a/dist/system/analytics.js b/dist/system/analytics.js index 5d6da61..68a3293 100644 --- a/dist/system/analytics.js +++ b/dist/system/analytics.js @@ -55,6 +55,9 @@ System.register(['aurelia-dependency-injection', 'aurelia-event-aggregator', 'au logging: { enabled: true }, + anonymizeIp: { + enabled: false + }, pageTracking: { enabled: false, getTitle: function getTitle(payload) { @@ -235,7 +238,8 @@ System.register(['aurelia-dependency-injection', 'aurelia-event-aggregator', 'au ga('set', { page: path, - title: title + title: title, + anonymizeIp: this._options.anonymizeIp.enabled }); ga('send', 'pageview'); }; diff --git a/src/analytics.js b/src/analytics.js index c442f00..3e30b6d 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -73,6 +73,9 @@ const defaultOptions = { logging: { enabled: true }, + anonymizeIp: { + enabled: false + }, pageTracking: { enabled: false, getTitle: (payload) => { @@ -256,7 +259,8 @@ export class Analytics { ga('set', { page: path, - title: title + title: title, + anonymizeIp: this._options.anonymizeIp.enabled }); ga('send', 'pageview'); }