From af5373c390cf41c20e134ebb0e44a37fe7e86e23 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 4 Dec 2023 22:42:13 -0800 Subject: [PATCH] Add analytics.openneo.net tags Self-hosted Plausible instance! I have need of usage numbers again, after a good few years of just not using it; but I don't want to send the data to Google, and I enjoy self-hosting things, so here we have it! --- app/views/layouts/application.html.haml | 1 + app/views/outfits/edit.html.haml | 1 + app/views/static/_analytics.html.erb | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 app/views/static/_analytics.html.erb diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d4234bb9..acbfd9c1 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -13,6 +13,7 @@ %link{href: image_path('favicon.png'), rel: 'icon'} = yield :stylesheets = stylesheet_link_tag "application" + = render 'static/analytics' = yield :meta = open_graph_tags = csrf_meta_tag diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index 807c8734..bad166dc 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -17,6 +17,7 @@ %link{href: image_path('favicon.png'), rel: 'icon'} = stylesheet_link_tag 'fonts' = javascript_include_tag 'wardrobe-2020-page', defer: true + = render 'static/analytics' = open_graph_tags = csrf_meta_tags %meta{name: 'dti-current-user-id', content: user_signed_in? ? current_user.id : "null"} diff --git a/app/views/static/_analytics.html.erb b/app/views/static/_analytics.html.erb new file mode 100644 index 00000000..04f06c64 --- /dev/null +++ b/app/views/static/_analytics.html.erb @@ -0,0 +1,2 @@ +<%= javascript_include_tag 'https://analytics.openneo.net/js/script.js', + defer: true, 'data-domain': 'impress.openneo.net' %> \ No newline at end of file