Update Umami Analytics support to include custom script URL option
Hi :wave:, Thanks for this awesome work on this theme.
This pull request adds support for specifying a custom script URL for Umami Analytics, allowing users to override the default region-based script. The documentation and analytics partial have been updated to reflect this new option.
This is related to : https://github.com/jpanther/congo/discussions/829#discussioncomment-11773875
Changes
Umami Analytics configuration improvements:
- Added
umamiAnalytics.scriptparameter to the configuration documentation (exampleSite/content/docs/configuration/index.md) to allow specifying a custom script URL for Umami Analytics. - Updated the Umami Analytics documentation to explain how to use the new
scriptparameter for custom or proxied script URLs, and clarified its precedence over the region parameter (exampleSite/content/docs/partials/index.md).
Template logic update:
- Modified the analytics partial (
layouts/_partials/analytics.html) to use the custom script URL if provided, falling back to the region-based default if not.
Testing
This has been tested locally with the following settings.
Deploy Preview for hugo-congo ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | cbbaf9d8b8482a6cf53bd8fda12408486a5e17c9 |
| Latest deploy log | https://app.netlify.com/projects/hugo-congo/deploys/68b86cd5fb4bf50008dc2c82 |
| Deploy Preview | https://deploy-preview-1103--hugo-congo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Updates ?