diff --git a/README.md b/README.md index a0c7926a..46e3abe1 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,7 @@ These options set global values that some pages or all pages in the site use by | baidu_analytics | string | no | | plausible_analytics | boolean | no | | matomo_analytics | boolean | no | +| umami_data_website_id | string | no | | description | string | yes | | keywords | array of strings | yes | | introDescription | string | yes | @@ -337,6 +338,10 @@ If using Matomo Analytics, configure the `matomo_analytics` global parameters in `matomoSiteID` Default is set to 1, change this to the siteid being tracked +If using [Umami Analytics](https://umami.is/), uncomment and configure the `umami_data_website_id` global parameter in your site with the data website ID provided in the script by Umami. It should be in the form of a GUID (# characters): 8-4-4-4-12. + +> NOTE: The head partial only loads analytics if the hugo environment is NOT `development`. + ### Blog directory Edit `params.toml` and change the `mainSections` key. Values will be directories where the blogs reside. diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 6831fa2f..36e13e68 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -149,3 +149,6 @@ enable = false # To enable matomo analytics change to `true`. websiteDomain = "example.com" # Set the domain name of your website, in most cases same as your base URL this is required. matomoDomain = "matomo.example.com" # Set to Matomo domain matomoSiteID = "1" # Default is set to 1, change this to the siteid being tracked + +# Umami Analytics -- https://umami.is/ +# umami_data_website_id = "GUID-8-4-4-4-12" # Umami Analytics data website id - GUID format (8-4-4-4-12) diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 4712ab3b..eddf454e 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -51,3 +51,7 @@ {{- end }} + +{{- with $config.umami_data_website_id }} + +{{- end }}