mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-07 03:29:20 +00:00
Fix Umami event name for long page titles
Use a fixed event name (type:view) and pass the title as metadata instead of embedding it in the event name, which caused issues with long page titles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d35a493ba0
commit
89e261f8e4
1 file changed
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
const type = document.head.querySelector('meta[property = "og:type"]').getAttribute("content");
|
||||||
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
let title = document.head.querySelector('meta[property = "og:title"]').getAttribute("content");
|
||||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute("content");
|
||||||
umami.track(type + ":" + title, { url: url });
|
umami.track(type + ":view", { title: title, url: url });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
Reference in new issue
Block a user