Skip to content

Commit deda8b1

Browse files
committed
Fix outbound link
1 parent 36d18f5 commit deda8b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/base-head.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const canonicalURL = canonical
258258

259259
<!-- REF: https://umami.is/docs/track-outbound-links -->
260260
<script type="text/javascript">
261-
(() => {
261+
document.addEventListener('DOMContentLoaded', () => {
262262
const name = 'outbound-link-click';
263263
document.querySelectorAll('a').forEach((a) => {
264264
if (
@@ -269,5 +269,5 @@ const canonicalURL = canonical
269269
a.setAttribute('data-umami-event-url', a.href);
270270
}
271271
});
272-
})();
272+
});
273273
</script>

0 commit comments

Comments
 (0)