fix: tracking code—remove async

- using async and defer on script tags is considered an [antipattern](https://almanac.httparchive.org/en/2022/javascript#async-defer-module-and-nomodule) as the defer will be ignored. Defer is the prefered behaviour in most situations.
pull/1729/head
Sam Vargas 2023-01-04 20:02:16 +00:00
parent 9ee6fb994c
commit 30d0aa937b
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ export default function TrackingCodeForm({ values, onClose }) {
rows={3} rows={3}
cols={60} cols={60}
spellCheck={false} spellCheck={false}
defaultValue={`<script async defer data-website-id="${values.websiteUuid}" src="${ defaultValue={`<script defer data-website-id="${values.websiteUuid}" src="${
document.location.origin document.location.origin
}${basePath}/${trackerScriptName ? `${trackerScriptName}.js` : 'umami.js'}"></script>`} }${basePath}/${trackerScriptName ? `${trackerScriptName}.js` : 'umami.js'}"></script>`}
readOnly readOnly