Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gethinode/mod-google-analytics
https://github.com/gethinode/mod-google-analytics
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gethinode/mod-google-analytics
- Owner: gethinode
- License: mit
- Created: 2024-09-15T09:00:45.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-19T03:09:24.000Z (3 months ago)
- Last Synced: 2024-10-19T05:38:05.734Z (3 months ago)
- Language: JavaScript
- Size: 391 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hinode Module - Google Analytics
A Hugo module to add Google Analytics to your Hinode site
## About
![Logo](https://raw.githubusercontent.com/gethinode/hinode/main/static/img/logo.png)
Hinode is a clean blog theme for [Hugo][hugo], an open-source static site generator. Hinode is available as a [template][repository_template], and a [main theme][repository]. This repository maintains a Hugo module to enable [Google Analytics][google-analytics], part of the Google Marketing Platform, to a Hinode site. Visit the Hinode documentation site for [installation instructions][hinode_docs].
## Contributing
This module uses [semantic-release][semantic-release] to automate the release of new versions. The package uses `husky` and `commitlint` to ensure commit messages adhere to the [Conventional Commits][conventionalcommits] specification. You can run `npx git-cz` from the terminal to help prepare the commit message.
## Configuration
> [!NOTE]
> By convention, Hinode uses kebab case as naming convention for module names. However, the module name in the site parameters is renamed to `GoogleAnalytics` to align with Hugo's privacy settings.Set you `G-tag` in your site configuration (usually `hugo.toml`) in the following section:
```toml
[services]
[services.googleAnalytics]
ID = "G-xxxxxxxxxx"
```You can modify the privacy configuration in the following section:
```toml
[privacy]
[privacy.googleAnalytics]
disable = false
respectDoNotTrack = false
```This module supports the following parameters (see the section `params.modules` in `config.toml`):
| Setting | Default | Description |
|---------------------------|---------|-------------|
| GoogleAnalytics.force | false | Trigger to force include the analytics scripts, bypassing other settings. Use this setting for debugging and testing only. |[hugo]: https://gohugo.io
[hinode_docs]: https://gethinode.com
[google-analytics]: https://marketingplatform.google.com
[repository]: https://github.com/gethinode/hinode.git
[repository_template]: https://github.com/gethinode/template.git
[conventionalcommits]: https://www.conventionalcommits.org
[husky]: https://typicode.github.io/husky/
[semantic-release]: https://semantic-release.gitbook.io/