diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index 08278305e..580082302 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -125,6 +125,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso const goatcounterScript = document.createElement("script") goatcounterScript.src = "${cfg.analytics.scriptSrc ?? "https://gc.zgo.at/count.js"}" goatcounterScript.async = true + goatcounterScript.setAttribute("spa-preserve", "true") goatcounterScript.setAttribute("data-goatcounter", "https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? "goatcounter.com"}/count") document.head.appendChild(goatcounterScript)