Skip to content

Commit

Permalink
fix(analytic): update Clarity type definition and improve script tag …
Browse files Browse the repository at this point in the history
…URL formatting
  • Loading branch information
arashagp committed Dec 18, 2024
1 parent 218f874 commit 045cd1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/analytic/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare global {

// Type of Clarity Analytics Setup
// eslint-disable-next-line @typescript-eslint/no-explicit-any
clarity: any;
clarity: (...args: unknown[]) => void;
}
}

Expand All @@ -23,7 +23,7 @@ export function setupClarityAnalytics(trackingId: string): void {
};
t = l.createElement(r);
t.async = 1;
t.src = 'https://www.clarity.ms/tag/' + i;
t.src = `https://www.clarity.ms/tag/${i}`;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
})(window, document, 'clarity', 'script', trackingId);
Expand Down

0 comments on commit 045cd1e

Please sign in to comment.