summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-08 21:26:26 +0800
committerEltrac <hi@guhub.cn>2025-04-08 21:26:26 +0800
commit1b446e552e75131e4f586368da496250ef12785f (patch)
tree3c6c139f7070ec8ca15e756e5157bc84f04d88bd
parent987f91e7156f4473764a7657f7d0eff27e57db5b (diff)
chore(analytics): track more events
Former-commit-id: 87a715739779746a3bf0e02fc795a8ad671d43cd
-rw-r--r--layouts/index.html16
-rw-r--r--layouts/partials/components/welcome.html2
2 files changed, 13 insertions, 5 deletions
diff --git a/layouts/index.html b/layouts/index.html
index d2a75ea7..9b2de377 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -16,7 +16,10 @@
{{ .Date.Format "Jan 2" }}
</time>
<h3{{ if $firstPost }} style="margin-bottom: 0"{{ end }}>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <a
+ href="{{ .Permalink }}"
+ data-umami-event="Click post link from index"
+ >{{ .Title }}</a>
</h3>
</div>
{{ with .Params.categories }}
@@ -38,7 +41,8 @@
</div>
{{ end }}
</div>
- <a href="/posts" class="index-section-morelink">
+ <a href="/posts" class="index-section-morelink"
+ data-umami-event="Click more posts link">
{{ T "moreLinks.posts" }}
</a>
</section>
@@ -54,7 +58,10 @@
style="view-transition-name: card-{{ .File.UniqueID }}">
<div class="card-header">
<h3 class="card-title">
- <a href="{{ .Permalink }}" class="card-title-link">{{ .Title }}</a>
+ <a
+ href="{{ .Permalink }}"
+ data-umami-event="Click card link from index"
+ class="card-title-link">{{ .Title }}</a>
</h3>
{{- if .Params.tags }}
<p class="card-tags markdown-body">
@@ -72,7 +79,8 @@
{{- end }}
</div>
<div style="margin: 1rem 0">
- <a href="/cards" class="index-section-morelink">
+ <a href="/cards" class="index-section-morelink"
+ data-umami-event="Click more cards link">
{{ T "moreLinks.cards" }}
</a>
</div>
diff --git a/layouts/partials/components/welcome.html b/layouts/partials/components/welcome.html
index cf330563..f8d6bfa0 100644
--- a/layouts/partials/components/welcome.html
+++ b/layouts/partials/components/welcome.html
@@ -6,7 +6,7 @@
<a class="post-series-item"
href="{{ .link }}"
title="{{ .description }}"
- data-umami-event="Click series link from index"
+ data-umami-event="Click series link from Banner"
>
<div class="post-series-cover">
<img src="{{ .cover }}" />