fix: remove async script attribute
using async and defer on script tags is considered an [antipattern](https://almanac.httparchive.org/en/2022/javascript#async-defer-module-and-nomodule) as defer will be ignored. Defer is the preferred behaviour in most situations.pull/1731/head
parent
796c65fa29
commit
258e8bb3d6
|
@ -5,7 +5,7 @@ import { Form, FormRow, TextArea } from 'react-basics';
|
|||
export default function TrackingCodeForm({ websiteId }) {
|
||||
const ref = useRef(null);
|
||||
const { trackerScriptName } = useConfig();
|
||||
const code = `<script async defer src="${trackerScriptName}" data-website-id="${websiteId}"></script>`;
|
||||
const code = `<script defer src="${trackerScriptName}" data-website-id="${websiteId}"></script>`;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -50,7 +50,6 @@ export default function TestConsole() {
|
|||
<Head>
|
||||
{typeof window !== 'undefined' && website && (
|
||||
<script
|
||||
async
|
||||
defer
|
||||
data-website-id={website.id}
|
||||
src={`${basePath}/umami.js`}
|
||||
|
|
Loading…
Reference in New Issue