You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/guide/configuration.md
+46-12Lines changed: 46 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -383,16 +383,6 @@ excludeSearch: true
383
383
---
384
384
```
385
385
386
-
### Google Analytics
387
-
388
-
To enable [Google Analytics](https://marketingplatform.google.com/about/analytics/), set `services.googleAnalytics.ID` flag in `hugo.yaml`:
389
-
390
-
```yaml {filename="hugo.yaml"}
391
-
services:
392
-
googleAnalytics:
393
-
ID: G-MEASUREMENT_ID
394
-
```
395
-
396
386
### Google Search Index
397
387
398
388
To [block Google Search](https://developers.google.com/search/docs/crawling-indexing/block-indexing) from indexing a page, set `noindex` to true in your page frontmatter:
@@ -409,7 +399,25 @@ To exclude an entire directory, use the [`cascade`](https://gohugo.io/configurat
409
399
> To block search crawlers, you can make a [`robots.txt` template](https://gohugo.io/templates/robots/).
410
400
> However, `robots.txt` instructions do not necessarily keep a page out of Google search results.
411
401
412
-
### Umami Analytics
402
+
### Analytics
403
+
404
+
Hextra has support for several different analytics solutions. Hextra only supports analytics in production environments. This is to ensure that you do not accidentally send analytic events when working locally. If, however, you do want to test analytics locally, you can run a production server using:
405
+
406
+
```
407
+
hugo server --environment production
408
+
```
409
+
410
+
#### Google Analytics
411
+
412
+
To enable [Google Analytics](https://marketingplatform.google.com/about/analytics/), set `services.googleAnalytics.ID` flag in `hugo.yaml`:
413
+
414
+
```yaml {filename="hugo.yaml"}
415
+
services:
416
+
googleAnalytics:
417
+
ID: G-MEASUREMENT_ID
418
+
```
419
+
420
+
#### Umami Analytics
413
421
414
422
To enable [Umami](https://umami.is/docs/), set `params.analytics.umami.serverURL` and `params.analytics.umami.websiteID` flag in `hugo.yaml`:
415
423
@@ -436,7 +444,7 @@ params:
436
444
# doNotTrack: "true" # optional
437
445
```
438
446
439
-
### Matomo Analytics
447
+
#### Matomo Analytics
440
448
441
449
To enable [Matomo](https://matomo.org/), set `params.analytics.matomo.URL` and `params.analytics.matomo.ID` flag in `hugo.yaml`:
442
450
@@ -448,6 +456,32 @@ params:
448
456
websiteID: "94db1cb1-74f4-4a40-ad6c-962362670409"
449
457
```
450
458
459
+
#### GoatCounter Analytics
460
+
461
+
To enable [GoatCounter](https://www.goatcounter.com/), set `params.analytics.goatCounter.code` in `hugo.yaml`
462
+
All settings available here are mirrors of the settings described in GoatCounter [settings](https://www.goatcounter.com/help/js#settings-44186)
463
+
464
+
```yaml {filename="hugo.yaml"}
465
+
params:
466
+
analytics:
467
+
goatCounter:
468
+
code: "ABCDE"
469
+
470
+
# Optional Settings
471
+
#------------------
472
+
# disables automatic collection of data
473
+
# noOnload: true
474
+
475
+
# disables event binding. See more here https://www.goatcounter.com/help/events
476
+
# noEvents: true
477
+
478
+
# allows data collection from local addresses. Use this with a production environment to test locally
479
+
# allowLocal: true
480
+
481
+
# Allow data collection when a page is loaded in a frame or iframe
482
+
# allowFrame: true
483
+
```
484
+
451
485
### LLMS.txt Support
452
486
453
487
To enable [llms.txt](https://llmstxt.org/) output format for your site, which provides a structured text outline for [large language models](https://en.wikipedia.org/wiki/Large_language_model) and AI agents, add the `llms` output format to your site's `hugo.yaml`:
0 commit comments