feat: port analytics to blox-analytics

This commit is contained in:
George Cushen committed 2023-12-29 22:59:55 +00:00
1 parent 824ef0dbf0
commit 1bc54d5d14
13 files changed
+71

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# blox-analytics
**A Hugo module (plugin) for website analytics and search engine verification.**
Are you using the `blox-tailwind` module? The analytics module is already included, so you do not need to install it. For all other sites, refer to the installation guide below.
## Install
Get analytics and verification for your Hugo site by following the guide below:
1. Add the module to your `config/_default/hugo.yaml`:
```yaml
module:
imports:
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
```
2. Load the module in your site's `<head>` with:
```go
{{ partial "blox_analytics/index" . }}
```
## Usage
[View the documentation](https://docs.hugoblox.com/reference/analytics/)
+3
View File
@@ -0,0 +1,3 @@
module github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
go 1.15
+4
View File
@@ -0,0 +1,4 @@
module:
mounts:
- source: layouts
target: layouts
@@ -0,0 +1,9 @@
{{/* HUGO BLOX: MARKETING MODULE */}}
{{/* VERIFICATIONS */}}
{{ partial "blox-analytics/verification" . }}
{{/* ANALYTICS */}}
{{ partial "blox-analytics/services/index" . }}
@@ -0,0 +1,7 @@
{{ partial "blox-analytics/services/google_analytics" . }}
{{ partial "blox-analytics/services/google_tag_manager" . }}
{{ partial "blox-analytics/services/microsoft_clarity" . }}
{{ partial "blox-analytics/services/baidu_tongji" . }}
{{ partial "blox-analytics/services/plausible" . }}
{{ partial "blox-analytics/services/fathom" . }}
{{ partial "blox-analytics/services/pirsch" . }}
@@ -0,0 +1,21 @@
{{/* Site Verification with Third Party Services */}}
{{- with site.Params.marketing.verification.google -}}
<meta name="google-site-verification" content="{{ . }}" />
{{- end -}}
{{- with site.Params.marketing.verification.bing -}}
<meta name="msvalidate.01" content="{{ . }}" />
{{- end -}}
{{- with site.Params.marketing.verification.yandex -}}
<meta name="yandex-verification" content="{{ . }}" />
{{- end -}}
{{- with site.Params.marketing.verification.pinterest -}}
<meta name="p:domain_verify" content="{{ . }}" />
{{- end -}}
{{- with site.Params.marketing.verification.baidu -}}
<meta name="baidu-site-verification" content="{{ . }}" />
{{- end -}}