From 1d6174a02cfdae16243b3e27f2f892ac192dbd53 Mon Sep 17 00:00:00 2001 From: katjam Date: Tue, 12 Nov 2024 22:48:39 +0000 Subject: [PATCH] Move plausible tracker embed into vite config --- app/Shared.elm | 1 - app/View.elm | 12 +----------- elm-pages.config.mjs | 1 + 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/Shared.elm b/app/Shared.elm index a8be398..0ead635 100644 --- a/app/Shared.elm +++ b/app/Shared.elm @@ -135,7 +135,6 @@ view sharedData page model toMsg pageView = [ Html.Styled.toUnstyled (Theme.Global.containerPage pageView.title [ View.fontPreload - , View.plausibleTracker , Theme.Global.globalStyles , viewPageHeader page { showMobileMenu = model.showMobileMenu } diff --git a/app/View.elm b/app/View.elm index bf5fa48..4bfc337 100644 --- a/app/View.elm +++ b/app/View.elm @@ -1,4 +1,4 @@ -module View exposing (View, fontPreload, map, plausibleTracker) +module View exposing (View, fontPreload, map) import Html.Styled exposing (Html, node) import Html.Styled.Attributes exposing (attribute, href, rel, src) @@ -24,13 +24,3 @@ fontPreload = , href "https://use.typekit.net/qwi3qrw.css" ] [] - - -plausibleTracker : Html msg -plausibleTracker = - node "SCRIPT" - [ attribute "defer" "defer" - , attribute "data-domain" "transdimension.uk" - , src "https://plausible.io/js/plausible.js" - ] - [] diff --git a/elm-pages.config.mjs b/elm-pages.config.mjs index 8982a8d..f8266ab 100644 --- a/elm-pages.config.mjs +++ b/elm-pages.config.mjs @@ -8,6 +8,7 @@ export default { return ` + `; }, preloadTagForFile(file) {