Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use .Site.Config.Services.GoogleAnalytics.ID instead. #1348

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions qdrant-landing/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ languageCode = "en-us"
title = "Qdrant - Vector Database"
theme = "qdrant-2024"

googleAnalytics = "G-NZYW2651NE"
enableRobotsTXT = true
canonifyURLs = true

Expand Down Expand Up @@ -117,4 +116,6 @@ disableKinds = ["taxonomy", "term"]
environment = '{production}'
path = '{**.skip,**.skip/*}'


[services]
[services.googleAnalytics]
id = 'G-NZYW2651NE'
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
Loading