mirror of https://github.com/portainer/portainer
feat(app): set anonymizeIp property for GA (#2919)
parent
d75f2f5d7d
commit
1d9166216a
|
@ -6,6 +6,7 @@ env:
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
angular: true
|
angular: true
|
||||||
|
__CONFIG_GA_ID: true
|
||||||
|
|
||||||
extends:
|
extends:
|
||||||
- 'eslint:recommended'
|
- 'eslint:recommended'
|
||||||
|
|
|
@ -40,7 +40,7 @@ angular.module('portainer')
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
AnalyticsProvider.setAccount('@@CONFIG_GA_ID');
|
AnalyticsProvider.setAccount({ tracker: __CONFIG_GA_ID, set: { anonymizeIp: true } });
|
||||||
AnalyticsProvider.startOffline(true);
|
AnalyticsProvider.startOffline(true);
|
||||||
|
|
||||||
toastr.options.timeOut = 3000;
|
toastr.options.timeOut = 3000;
|
||||||
|
|
|
@ -78,7 +78,6 @@ module.exports = function(grunt) {
|
||||||
distdir: 'dist/public',
|
distdir: 'dist/public',
|
||||||
shippedDockerVersion: '18.09.3',
|
shippedDockerVersion: '18.09.3',
|
||||||
shippedDockerVersionWindows: '17.09.0-ce',
|
shippedDockerVersionWindows: '17.09.0-ce',
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
|
||||||
config: gruntfile_cfg.config,
|
config: gruntfile_cfg.config,
|
||||||
src: gruntfile_cfg.src,
|
src: gruntfile_cfg.src,
|
||||||
clean: gruntfile_cfg.clean,
|
clean: gruntfile_cfg.clean,
|
||||||
|
@ -99,7 +98,7 @@ gruntfile_cfg.env = {
|
||||||
prod: {
|
prod: {
|
||||||
NODE_ENV: 'production'
|
NODE_ENV: 'production'
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
gruntfile_cfg.webpack = {
|
gruntfile_cfg.webpack = {
|
||||||
dev: webpackDevConfig,
|
dev: webpackDevConfig,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { ProvidePlugin, IgnorePlugin } = require('webpack');
|
const pkg = require('../package.json');
|
||||||
|
const { ProvidePlugin, IgnorePlugin, DefinePlugin } = require('webpack');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const WebpackBuildNotifierPlugin = require('webpack-build-notifier');
|
const WebpackBuildNotifierPlugin = require('webpack-build-notifier');
|
||||||
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
|
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
|
||||||
|
@ -94,6 +95,9 @@ module.exports = {
|
||||||
new LodashModuleReplacementPlugin({
|
new LodashModuleReplacementPlugin({
|
||||||
shorthands: true,
|
shorthands: true,
|
||||||
collections: true
|
collections: true
|
||||||
|
}),
|
||||||
|
new DefinePlugin({
|
||||||
|
__CONFIG_GA_ID: JSON.stringify(pkg.config.GA_ID),
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
|
|
Loading…
Reference in New Issue