Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove google analytics #42515

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions resources/frontend_client/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,5 @@

<body>
<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>
</html>
3 changes: 0 additions & 3 deletions resources/frontend_client/inline_js/index_ganalytics.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/metabase/server/middleware/security.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
(.update (.getBytes (slurp (io/resource resource-filename))))))))]
(mapv file-hash [ ;; inline script in index.html that sets `MetabaseBootstrap` and the like
"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
"frontend_client/inline_js/init.js"])))

Expand Down
1 change: 0 additions & 1 deletion src/metabase/server/routes/index.clj
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
(str "frontend_client/" entrypoint-name ".html")
(let [{:keys [anon-tracking-enabled google-auth-client-id], :as public-settings} (setting/user-readable-values-map #{:public})]
{:bootstrapJS (load-inline-js "index_bootstrap")
:googleAnalyticsJS (load-inline-js "index_ganalytics")
:bootstrapJSON (escape-script (json/generate-string public-settings))
:userLocalizationJSON (escape-script (load-localization (:locale params)))
:siteLocalizationJSON (escape-script (load-localization (public-settings/site-locale)))
Expand Down
Loading