Merge 43b6053e10d5609a07f6c4bf51ca57fbd342e905 into 32ec711767401c93605b7631f03eee47dea1cada

This commit is contained in:
Anton Bulakh 2025-02-07 21:11:00 +01:00 committed by GitHub
commit cf8edbe5c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,6 +125,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
const goatcounterScript = document.createElement("script") const goatcounterScript = document.createElement("script")
goatcounterScript.src = "${cfg.analytics.scriptSrc ?? "https://gc.zgo.at/count.js"}" goatcounterScript.src = "${cfg.analytics.scriptSrc ?? "https://gc.zgo.at/count.js"}"
goatcounterScript.async = true goatcounterScript.async = true
goatcounterScript.setAttribute("spa-preserve", "true")
goatcounterScript.setAttribute("data-goatcounter", goatcounterScript.setAttribute("data-goatcounter",
"https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? "goatcounter.com"}/count") "https://${cfg.analytics.websiteId}.${cfg.analytics.host ?? "goatcounter.com"}/count")
document.head.appendChild(goatcounterScript) document.head.appendChild(goatcounterScript)