Skip to content

Commit

Permalink
T000 Disable user-tracking
Browse files Browse the repository at this point in the history
We've stopped paying for plausible.io and there's no reason for keeping
the tracking-script active anymore.
  • Loading branch information
grinkus-adapt committed Jun 10, 2024
1 parent 3a48e99 commit 3be30c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
24 changes: 1 addition & 23 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,8 @@ const HtmlAttributes = { lang: `lt` };
let headTags = [];

export const onRenderBody = ({ setHtmlAttributes, setHeadComponents }) => {
const headComponents = [headTags];

setHtmlAttributes(HtmlAttributes);

headComponents.push(
<script
dangerouslySetInnerHTML={{
__html: `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`,
}}
/>
);

if (process.env.NODE_ENV === `production`) {
headComponents.push(
<script
defer
data-api="https://s.suukraina.lt/api/event"
data-domain="suukraina.lt"
src="https://s.suukraina.lt/js/script.outbound-links.js"
/>
);
}

setHeadComponents(headComponents);
setHeadComponents(headTags);

// Empty the headTags array for the next page.
headTags.splice(0, headTags.length);
Expand Down
6 changes: 0 additions & 6 deletions src/pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ const NotFoundPage = () => {
Go home
</Button>
</ErrorPage>

<script
dangerouslySetInnerHTML={{
__html: `plausible("404",{ props: { path: document.location.pathname } });`,
}}
/>
</main>
);
};
Expand Down

0 comments on commit 3be30c5

Please sign in to comment.