Skip to content

Commit d0f573a

Browse files
committed
added more plausible custom events to nav
1 parent b455025 commit d0f573a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

layouts/partials/nav.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div x-show="isProductsDropdownOpen" @click.outside="isProductsDropdownOpen = false" x-cloak class="absolute mt-6 py-2 w-64 bg-white rounded shadow-md z-50">
3131
{{- range .Site.Data.nav.ProductsRelLinks }}
3232
{{- with $.Site.GetPage . }}
33-
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
33+
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
3434
{{- end}}
3535
{{- end }}
3636
</div>
@@ -40,7 +40,7 @@
4040
{{- with $.Site.GetPage . }}
4141
{{- $borderColor := cond (hasPrefix $currentRelPermalink .RelPermalink) $textColor "transparent" }}
4242
<li class="flex items-center mx-2 border-b-2 border-{{ $borderColor }} hover:border-{{ $textColor }}">
43-
<a class="p-2 hover:no-underline" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
43+
<a class="p-2 hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
4444
</li>
4545
{{- end }}
4646
{{- end }}
@@ -53,7 +53,7 @@
5353
<div x-show="isSupportUsDropdownOpen" @click.outside="isSupportUsDropdownOpen = false" x-cloak class="absolute mt-6 py-2 w-64 bg-white rounded shadow-md z-50">
5454
{{- range .Site.Data.nav.SupportUsRelLinks }}
5555
{{- with $.Site.GetPage . }}
56-
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
56+
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
5757
{{- end}}
5858
{{- end }}
5959
</div>
@@ -68,7 +68,7 @@
6868
<div x-show="isLearnMoreDropdownOpen" @click.outside="isLearnMoreDropdownOpen = false" x-cloak class="absolute mt-6 py-2 w-96 bg-white rounded shadow-md z-50">
6969
{{- range .Site.Data.nav.LearnMoreRelLinks }}
7070
{{- with $.Site.GetPage . }}
71-
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
71+
<a href="{{ .RelPermalink }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
7272
{{- end}}
7373
{{- end }}
7474
</div>
@@ -106,7 +106,7 @@
106106
<div class="relative">
107107
<div x-show="isLangDropdownOpen" @click.outside="isLangDropdownOpen = false" x-cloak class="absolute right-0 mt-6 py-2 w-48 bg-white rounded shadow-md z-50">
108108
{{- range .Translations }}
109-
<a :href="'{{ .RelPermalink }}' + (window.location.search ?? '')" lang="{{ .Lang }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline">{{ .Language.LanguageName }}</a>
109+
<a :href="'{{ .RelPermalink }}' + (window.location.search ?? '')" lang="{{ .Lang }}" class="block px-4 py-2 text-gray-800 hover:bg-secondary hover:text-white hover:no-underline plausible-event-name=nav-lang-{{ .Lang }}">{{ .Language.LanguageName }}</a>
110110
{{- end }}
111111
</div>
112112
</div>
@@ -123,7 +123,7 @@
123123
<div class="mt-1">
124124
{{- range .Site.Data.nav.ProductsRelLinks }}
125125
{{- with $.Site.GetPage . }}
126-
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
126+
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
127127
{{- end }}
128128
{{- end }}
129129
</div>
@@ -132,7 +132,7 @@
132132

133133
{{- range .Site.Data.nav.RelLinks }}
134134
{{- with $.Site.GetPage . }}
135-
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
135+
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
136136
{{- end }}
137137
{{- end }}
138138

@@ -144,7 +144,7 @@
144144
<div class="mt-1">
145145
{{- range .Site.Data.nav.SupportUsRelLinks }}
146146
{{- with $.Site.GetPage . }}
147-
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
147+
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
148148
{{- end }}
149149
{{- end }}
150150
</div>
@@ -157,7 +157,7 @@
157157
<div class="mt-1">
158158
{{- range .Site.Data.nav.LearnMoreRelLinks }}
159159
{{- with $.Site.GetPage . }}
160-
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
160+
<a class="block py-2 mx-2 hover:text-secondary hover:no-underline plausible-event-name=nav-{{ replaceRE "^.*/([^/]+)/?$" "$1" .RelPermalink }}" href="{{ .RelPermalink }}">{{ cond (isset .Params "navtitle") .Params.Navtitle .Title }}</a>
161161
{{- end }}
162162
{{- end }}
163163
</div>
@@ -169,13 +169,13 @@
169169
</div>
170170
<div class="mt-1">
171171
{{ range .Translations }}
172-
<a :href="'{{ .RelPermalink }}' + (window.location.search ?? '')" lang="{{ .Lang }}" class="block px-2 py-1 hover:text-secondary hover:no-underline">{{ .Language.LanguageName }}</a>
172+
<a :href="'{{ .RelPermalink }}' + (window.location.search ?? '')" lang="{{ .Lang }}" class="block px-2 py-1 hover:text-secondary hover:no-underline plausible-event-name=nav-lang-{{ .Lang }}">{{ .Language.LanguageName }}</a>
173173
{{ end }}
174174
</div>
175175

176176
<hr class="border-primary my-2"/>
177177

178-
<a class="block p-2 hover:text-secondary hover:no-underline" href="https://github.com/cryptomator" target="_blank" rel="noopener">
178+
<a class="block p-2 hover:text-secondary hover:no-underline plausible-event-name=nav-github" href="https://github.com/cryptomator" target="_blank" rel="noopener">
179179
<i class="fab fa-github fa-fw"></i>
180180
<span>{{ i18n "nav_github" . }}</span>
181181
</a>

0 commit comments

Comments
 (0)