Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,29 +359,21 @@ export default withMermaid(
rel: "stylesheet",
},
],
// Analytics

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTM scripts not removed despite stated intent

High Severity

The PR intended to replace Google Tag Manager (GTM) and GoatCounter with Plausible. While GoatCounter was removed, the GTM scripts (loader and inline gtag() initialization) remain in the head array. This results in dual analytics tracking, with both GTM and Plausible firing.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bf02c04. Configure here.

// Analytics (Plausible via Cloudflare Worker proxy)
[
"script",
{
async: "",
src: "https://www.googletagmanager.com/gtag/js?id=G-B69G389C8T",
src: "https://shrill-1.en.dev/shrill/script.js",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The Plausible script requires a data-domain attribute to identify the site in your dashboard. Additionally, since you are using a custom path for the event endpoint (/f5f1/event), you should specify the data-api attribute on the script tag. This is the standard way to configure Plausible with a proxy and ensures that the script correctly routes events through your Cloudflare Worker.

          "data-domain": "mise.jdx.dev",
          "data-api": "https://shrill-1.en.dev/f5f1/event",
          src: "https://shrill-1.en.dev/shrill/script.js",

},
],
[
"script",
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-B69G389C8T');`,
],
[
"script",
{
"data-goatcounter": "https://jdx.goatcounter.com/count",
async: "",
src: "//gc.zgo.at/count.js",
},
`window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
plausible.init({
endpoint: "https://shrill-1.en.dev/f5f1/event"
})`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This manual initialization script is non-standard for the official Plausible script and is missing the required domain property. If the script tag above is correctly configured with data-domain and data-api, the official script will automatically handle pageview tracking. You can simplify this block to the standard Plausible helper, which allows you to trigger manual events later if needed.

        `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`

],
// OpenGraph
["meta", { property: "og:site_name", content: "mise-en-place" }],
Expand Down
Loading