How to manually set up clarity in vue js website?
Ive tried to copy the code in clarity directly and embed it into the head tag in my App.vue but it throws syntax errors and now I tried this in a script tage in app.vue but doesn't seem like its being tracked?
const script = document.createElement('script'); script.onload = () => { (function (c, l, a, r, i, t, y) { c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) }; t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i; y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y); })(window, document, "clarity", "script", "cfkwz7s9tg"); }; document.head.appendChild(script);
Is there a reason for why you cannot include the script in the <head> of index.html?