Skip to content

Commit

Permalink
fix: Use .Site.Config.Services.GoogleAnalytics.ID instead.
Browse files Browse the repository at this point in the history
Signed-off-by: Anush008 <[email protected]>
  • Loading branch information
Anush008 committed Dec 11, 2024
1 parent 0369b3c commit c709af6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions qdrant-landing/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{ if hugo.IsProduction }}
{{ if .Site.GoogleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
{{ if .Site.Config.Services.GoogleAnalytics.ID }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', '{{ .Site.GoogleAnalytics }}');
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
</script>
{{ end }}

Expand Down Expand Up @@ -38,6 +38,6 @@

<!--Segment-->
{{ if .Site.Params.segmentWriteKey }}
{{ $segmentJs := resources.Get "js/segment-setup.js" | js.Build (dict "params" (dict "segmentWriteKey" .Site.Params.segmentWriteKey "gaMeasurementId" .Site.GoogleAnalytics)) | minify | resources.Fingerprint "sha512" }}
{{ $segmentJs := resources.Get "js/segment-setup.js" | js.Build (dict "params" (dict "segmentWriteKey" .Site.Params.segmentWriteKey "gaMeasurementId" .Site.Config.Services.GoogleAnalytics.ID)) | minify | resources.Fingerprint "sha512" }}
<script src="{{ $segmentJs.RelPermalink }}?v=eu"></script>
{{ end }}
6 changes: 3 additions & 3 deletions qdrant-landing/themes/qdrant/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

{{ if hugo.IsProduction }}

{{ if .Site.GoogleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
{{ if .Site.Config.Services.GoogleAnalytics.ID }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', '{{ .Site.GoogleAnalytics }}');
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
</script>
{{ end }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5 class="tableOfContent__header">Table of contents</h5>
</ul>
<div class="divider pt-2 mb-3"></div>

{{ if (and (not .Params.hide_feedback) (.Site.Params.feedback.enable) (.Site.GoogleAnalytics)) }}
{{ if (and (not .Params.hide_feedback) (.Site.Params.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }}
{{ partial "feedback.html" . -}}
{{ end }}
</div>
Expand Down

0 comments on commit c709af6

Please sign in to comment.