Skip to content

Commit 9759875

Browse files
author
Kevin Bimonte
committed
other: possibly GDPR-compliant analytics with Linux Foundation Copyright
1 parent 306b59f commit 9759875

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

base.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,22 @@ theme:
7272
logo: assets/logo-white.svg
7373
favicon: assets/favicon.ico
7474

75+
copyright: >-
76+
Copyright © 2025 The Linux Foundation ™ –
77+
<a href="#__consent">Change cookie settings</a>
78+
7579
extra:
7680
analytics:
7781
provider: goattracker
82+
consent:
83+
title: Cookie consent
84+
description: >-
85+
We use cookies to recognize your repeated visits. With your consent, you're helping us to
86+
make our documentation better.
87+
cookies:
88+
analytics:
89+
name: Goat Tracker Analytics
90+
checked: true
7891
social:
7992
- icon: fontawesome/brands/github
8093
link: https://github.com/concourse
@@ -232,4 +245,4 @@ nav:
232245
- ecosystem/index.md
233246
- support/index.md
234247
- Blog:
235-
- blog/index.md
248+
- blog/index.md
Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
<script>
2-
/* Wait for page to load and application to mount */
3-
document.addEventListener("DOMContentLoaded", function () {
4-
location$.subscribe(function (url) {
5-
window.goatcounter.count({
6-
path: url.pathname + url.search + url.hash,
1+
<script id="__analytics">
2+
function __md_analytics() {
3+
/* Wait for page to load and application to mount */
4+
document.addEventListener("DOMContentLoaded", function () {
5+
location$.subscribe(function (url) {
6+
window.goatcounter.count({
7+
path: url.pathname + url.search + url.hash,
8+
})
79
})
810
})
9-
})
10-
</script>
1111

12-
<script data-goatcounter="https://concourse.goatcounter.com/count"
13-
async src="//gc.zgo.at/count.js"></script>
12+
/* Create script tag */
13+
let script = document.createElement("script");
14+
script.async = true;
15+
script.src = "//gc.zgo.at/count.js";
16+
script.dataset.goatcounter = "https://concourse.goatcounter.com/count";
17+
18+
/* Inject script tag */
19+
let container = document.getElementById("__analytics")
20+
container.insertAdjacentElement("afterend", script)
21+
}
22+
</script>

0 commit comments

Comments
 (0)