Skip to content

Commit

Permalink
fix(analytics): use hostname rather than full url for plausible script
Browse files Browse the repository at this point in the history
  • Loading branch information
bardenHa committed Oct 15, 2023
1 parent 95e8d95 commit 925f36a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/layouts/page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const { profile } = constants;
const props = Astro.props as Props;
const title = formatTitle({ title: props.title, name: profile.name, reverse: !!props.reverseTitle });
const hostname = new URL(constants.site).hostname;
---

<html lang="en" color-scheme="auto" dir="ltr">
Expand Down Expand Up @@ -82,7 +83,7 @@ const title = formatTitle({ title: props.title, name: profile.name, reverse: !!p
/></noscript
>
<!-- Third party scripts -->
{import.meta.env.PROD && <script defer data-domain={constants.site} src="https://plausible.io/js/script.js" />}
{import.meta.env.PROD && <script defer data-domain={hostname} src="https://plausible.io/js/script.js" />}
</head>
<body class="overflow-x-hidden overflow-y-scroll bg-content-neutral-primary">
<a href="#main-content" class="skip-link"> Skip to content</a>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/uses.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { getEntry } from 'astro:content';
const uses = await getEntry('pages', 'uses');
const { Content } = await uses.render();
// TODO: add piccy like - https://andy-bell.co.uk/uses/
---

<Page
Expand Down

0 comments on commit 925f36a

Please sign in to comment.