perf: add async and defer mark for inject website script
This commit is contained in:
parent
b050a56d4a
commit
64f2a27a92
@ -10,6 +10,8 @@ export function useInjectWebsiteScript() {
|
|||||||
const el = document.createElement('script');
|
const el = document.createElement('script');
|
||||||
el.src = location.origin + '/tracker.js';
|
el.src = location.origin + '/tracker.js';
|
||||||
el.setAttribute('data-website-id', String(websiteId));
|
el.setAttribute('data-website-id', String(websiteId));
|
||||||
|
el.setAttribute('async', 'async');
|
||||||
|
el.setAttribute('defer', 'defer');
|
||||||
document.head.append(el);
|
document.head.append(el);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user