Comments (6)
Using your Matomo example, their docs say to insert the relevant JS into the <head>
element. So you can override this theme's head partial with your custom changes. Here's how to do that:
(1) Copy file
/your-site/themes/minimal-bootstrap-hugo-theme/layouts/partials/head.html
(2) Paste that file to
/your-site/layouts/partials/head.html
(3) Put the Matomo JS into the new head partial you created. Hugo will then use the new partial when building your site
from minimal-bootstrap-hugo-theme.
Hi @FelixZett.
Google Analytics is already supported. You can see this if you take a look at the example config.toml
.
There are many params in that file, but really this is all you'll need in your own config.toml
[params]
googleAnalytics = "UA-123456789-1"
from minimal-bootstrap-hugo-theme.
Thanks @zwbetz-gh,
please excuse my bad use of google analytics as example. I was refering to analytics services that uses similar methods like google analytics, but not the tool itself.
from minimal-bootstrap-hugo-theme.
Did you have a particular example in mind?
from minimal-bootstrap-hugo-theme.
Sure, Matomo (formerly Piwik) is an open source analytics. The implementation is similar to Google.
https://matomo.org/docs/installation/#install-the-javascript-tracking-tag
Most themes have some kind of layout partial to add analytics.
from minimal-bootstrap-hugo-theme.
Thank you very much. That should do the trick.
from minimal-bootstrap-hugo-theme.
Related Issues (12)
- Change font style and size HOT 2
- bootstrap.min.css 404 HOT 2
- How to config pagination of the posts? HOT 1
- Stackbit App - Validating Data HOT 1
- Fix go template syntax after upgrade to hugo v71.1.1 HOT 1
- date and tag are not displayed on the post page HOT 2
- Error while building template. HOT 1
- Categories are displaying brackets - easy fix HOT 1
- help me. HOT 1
- Click on tag doesn't filter by that tag HOT 2
- Home entry doesn't work as expected (support request) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minimal-bootstrap-hugo-theme.