Skip to content

Commit

Permalink
Add anonymizeIp as option (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderschbe authored and miguelzakharia committed May 17, 2018
1 parent 6031355 commit cc9d522
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion dist/amd/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
};
Expand Down
6 changes: 5 additions & 1 deletion dist/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
};
Expand Down
6 changes: 5 additions & 1 deletion dist/commonjs/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ var defaultOptions = {
logging: {
enabled: true
},
anonymizeIp: {
enabled: false
},
pageTracking: {
enabled: false,
getTitle: function getTitle(payload) {
Expand Down Expand Up @@ -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');
};
Expand Down
6 changes: 5 additions & 1 deletion dist/system/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
};
Expand Down
6 changes: 5 additions & 1 deletion src/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const defaultOptions = {
logging: {
enabled: true
},
anonymizeIp: {
enabled: false
},
pageTracking: {
enabled: false,
getTitle: (payload) => {
Expand Down Expand Up @@ -256,7 +259,8 @@ export class Analytics {

ga('set', {
page: path,
title: title
title: title,
anonymizeIp: this._options.anonymizeIp.enabled
});
ga('send', 'pageview');
}
Expand Down

0 comments on commit cc9d522

Please sign in to comment.