From 3eca13e2bced1e64a3533c64e450282e378376d5 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Thu, 11 Aug 2022 14:04:05 +0100 Subject: [PATCH] Renames general tracking code file; updates darkswarm --- .../{_matomo_tag.html.haml => _matomo_tracking.html.haml} | 8 -------- app/views/layouts/darkswarm.html.haml | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) rename app/views/layouts/{_matomo_tag.html.haml => _matomo_tracking.html.haml} (63%) diff --git a/app/views/layouts/_matomo_tag.html.haml b/app/views/layouts/_matomo_tracking.html.haml similarity index 63% rename from app/views/layouts/_matomo_tag.html.haml rename to app/views/layouts/_matomo_tracking.html.haml index 7b8bbe834b..db8b02408b 100644 --- a/app/views/layouts/_matomo_tag.html.haml +++ b/app/views/layouts/_matomo_tracking.html.haml @@ -1,12 +1,4 @@ -- if Spree::Config.matomo_tag_manager_url.present? - :javascript - var _mtm = window._mtm = window._mtm || []; - _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - var u="#{Spree::Config.matomo_tag_manager_url}"; - g.type='text/javascript'; g.async=true; g.defer=true; g.src=u; s.parentNode.insertBefore(g,s); - - if Spree::Config.matomo_url.present? :javascript var _paq = window._paq || []; diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index e6f94dee84..198bef3129 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -14,7 +14,7 @@ = favicon_link_tag "/favicon-staging.ico" %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} %link{href: asset_pack_path("media/fonts/OFN-v2.woff"), rel: "preload", as: "font", crossorigin: "anonymous"} - = render "layouts/matomo_tag" + = render "layouts/matomo_tracking" = language_meta_tags = stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload"