diff options
author | Siegfried Ehret <49895321+siegfried-ehret-sonarsource@users.noreply.github.com> | 2019-05-08 14:19:20 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-05-08 20:21:05 +0200 |
commit | 3e6a9effc6e070a0480909419982031fd5280881 (patch) | |
tree | 5dc91662db2c54d0e45ea45568fd8c40de620496 /server/sonar-web | |
parent | 24464817bd8c1ca308bd666fc153a0027ba2ac4c (diff) | |
download | sonarqube-3e6a9effc6e070a0480909419982031fd5280881.tar.gz sonarqube-3e6a9effc6e070a0480909419982031fd5280881.zip |
SONARCLOUD-615 Add google tag manager scripts
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/config/webpack.config.js | 1 | ||||
-rw-r--r-- | server/sonar-web/public/analytics.js | 19 | ||||
-rw-r--r-- | server/sonar-web/public/index.html | 14 |
3 files changed, 28 insertions, 6 deletions
diff --git a/server/sonar-web/config/webpack.config.js b/server/sonar-web/config/webpack.config.js index ec6ed103d5d..8e6d754aad4 100644 --- a/server/sonar-web/config/webpack.config.js +++ b/server/sonar-web/config/webpack.config.js @@ -193,6 +193,7 @@ module.exports = ({ production = true, release = false }) => { !production && new webpack.HotModuleReplacementPlugin() ].filter(Boolean), + performance: production && release ? { diff --git a/server/sonar-web/public/analytics.js b/server/sonar-web/public/analytics.js new file mode 100644 index 00000000000..bfb641e5e34 --- /dev/null +++ b/server/sonar-web/public/analytics.js @@ -0,0 +1,19 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ diff --git a/server/sonar-web/public/index.html b/server/sonar-web/public/index.html index 11e69bd1c71..15b0b4fe201 100644 --- a/server/sonar-web/public/index.html +++ b/server/sonar-web/public/index.html @@ -31,18 +31,20 @@ </head> <body> - <div id="content"> - <div class="global-loading"> - <i class="spinner global-loading-spinner"></i> - <span class="global-loading-text">Loading...</span> - </div> - </div> <script> window.baseUrl = '%WEB_CONTEXT%'; window.serverStatus = '%SERVER_STATUS%'; window.instance = '%INSTANCE%'; window.official = %OFFICIAL%; </script> + <script src="./analytics.js"></script> + + <div id="content"> + <div class="global-loading"> + <i class="spinner global-loading-spinner"></i> + <span class="global-loading-text">Loading...</span> + </div> + </div> <% for (let chunk in htmlWebpackPlugin.files.chunks) { %> <script type="module" src="%WEB_CONTEXT%/<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script> <script nomodule src="%WEB_CONTEXT%/<%= htmlWebpackPlugin.files.chunks[chunk].entry.replace(/m\.[\w\d]+/, htmlWebpackPlugin.options.timestamp) %>"></script> |