mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
seline && umami enableTrackEvent
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script async src="https://cdn.seline.so/seline.js" data-token="{{ site.Params.selineAnalytics.token }}" data-id="seline-script"></script>
|
||||
|
||||
{{ if .Site.Params.selineAnalytics.enableTrace | default false }}
|
||||
{{ if .Site.Params.selineAnalytics.enableTrackEvent | default false }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="seline-script"]')
|
||||
.addEventListener('load', function () {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.umamiAnalytics.enableTrackEvent | default false }}
|
||||
<script type="text/javascript">
|
||||
document.querySelector('script[data-id="umami-script"]')
|
||||
.addEventListener('load', function () {
|
||||
@@ -18,4 +19,5 @@
|
||||
let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content');
|
||||
umami.track(type + ':' + title, {'url': url});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user