fix(umami): format correct string from custom hosts (#826)

This commit is contained in:
Aaron Pham 2024-02-08 11:45:20 -05:00 committed by GitHub
parent 330e322e48
commit 51818efc38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,7 +119,7 @@ function addGlobalPageResources(
} else if (cfg.analytics?.provider === "umami") {
componentResources.afterDOMLoaded.push(`
const umamiScript = document.createElement("script")
umamiScript.src = cfg.analytics.host ?? "https://analytics.umami.is/script.js"
umamiScript.src = ${cfg.analytics.host} ?? "https://analytics.umami.is/script.js"
umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}")
umamiScript.async = true