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

feat: Add option to use GoatCounter analytics #1534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slashtechno
Copy link

I learned about GoatCounter a while ago and wanted to implement it on my site running PaperMod. GoatCounter provides open-source, privacy-friendly web analytics and can be self-hosted. I added three lines to layouts/partials/head.html and it works.

The script, count.js, can also be hosted as a simple JS file. In my case, I wanted to have it in static/. I added site.Params.analytics.goatcounter.Src which can be used to override the default mirror.
The "code" (similar to a site verification tag) can be set via site.Params.analytics.goatcounter.Code.

I'm not sure if this goes against the PR policy of "not [including] any CDN resources/links" since it optionally uses the GoatCounter script.

Copy link

sonarcloud bot commented Jun 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@adityatelange adityatelange added the ext-resources Uses external resources (js/css) from CDNs label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext-resources Uses external resources (js/css) from CDNs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants