Skip to content
Snippets Groups Projects
Unverified Commit 84519c83 authored by Nicolò Pretto's avatar Nicolò Pretto Committed by GitHub
Browse files

remove google analytics (#42515)

parent 6cc0f2bc
No related branches found
No related tags found
No related merge requests found
...@@ -45,12 +45,5 @@ ...@@ -45,12 +45,5 @@
<body> <body>
<div id="root"></div> <div id="root"></div>
<!-- Google Analytics -->
<!-- If you modify this script, make sure you update the whitelisted Content-Security-Policy hash in metabase.server.middleware.security -->
{{#enableAnonTracking}}
<script type="text/javascript">{{{googleAnalyticsJS}}}</script>
{{/enableAnonTracking}}
</body> </body>
</html> </html>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
(.update (.getBytes (slurp (io/resource resource-filename))))))))] (.update (.getBytes (slurp (io/resource resource-filename))))))))]
(mapv file-hash [ ;; inline script in index.html that sets `MetabaseBootstrap` and the like (mapv file-hash [ ;; inline script in index.html that sets `MetabaseBootstrap` and the like
"frontend_client/inline_js/index_bootstrap.js" "frontend_client/inline_js/index_bootstrap.js"
;; inline script in index.html that loads Google Analytics
"frontend_client/inline_js/index_ganalytics.js"
;; inline script in init.html ;; inline script in init.html
"frontend_client/inline_js/init.js"]))) "frontend_client/inline_js/init.js"])))
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
(str "frontend_client/" entrypoint-name ".html") (str "frontend_client/" entrypoint-name ".html")
(let [{:keys [anon-tracking-enabled google-auth-client-id], :as public-settings} (setting/user-readable-values-map #{:public})] (let [{:keys [anon-tracking-enabled google-auth-client-id], :as public-settings} (setting/user-readable-values-map #{:public})]
{:bootstrapJS (load-inline-js "index_bootstrap") {:bootstrapJS (load-inline-js "index_bootstrap")
:googleAnalyticsJS (load-inline-js "index_ganalytics")
:bootstrapJSON (escape-script (json/generate-string public-settings)) :bootstrapJSON (escape-script (json/generate-string public-settings))
:userLocalizationJSON (escape-script (load-localization (:locale params))) :userLocalizationJSON (escape-script (load-localization (:locale params)))
:siteLocalizationJSON (escape-script (load-localization (public-settings/site-locale))) :siteLocalizationJSON (escape-script (load-localization (public-settings/site-locale)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment