Skip to content

Commit

Permalink
Merge pull request #459 from geeksforsocialchange/fix/458-correct-pla…
Browse files Browse the repository at this point in the history
…usible-embed-markup

Move plausible tracker embed into vite config
  • Loading branch information
katjam authored Nov 13, 2024
2 parents 1cdd017 + 1d6174a commit 895258f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion app/Shared.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
12 changes: 1 addition & 11 deletions app/View.elm
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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"
]
[]
1 change: 1 addition & 0 deletions elm-pages.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
return `
<link rel="stylesheet" href="/style.css" />
<meta name="generator" content="elm-pages v${context.cliVersion}" />
<script defer="defer" data-domain="transdimension.uk" src="https://plausible.io/js/script.outbound-links.js"></script>
`;
},
preloadTagForFile(file) {
Expand Down

0 comments on commit 895258f

Please sign in to comment.