@@ -35,19 +35,22 @@ Add the following site parameter to your project's configuration file:
35
35
{{< tabpane persistLang=false >}}
36
36
{{< tab header="Configuration file:" disabled=true />}}
37
37
{{< tab header="config.toml" lang="toml" >}}
38
+
38
39
googleAnalytics = "PUT-YOUR-ANALYTICS-ID-HERE"
39
- {{< /tab >}}
40
- {{< tab header="config.yaml" lang="yaml" >}}
40
+
41
+ {{< /tab >}} {{< tab header="config.yaml" lang="yaml" >}}
42
+
41
43
googleAnalytics: PUT-YOUR-ANALYTICS-ID-HERE
42
- {{< /tab >}}
43
- {{< tab header="config.json" lang="json" >}}
44
+
45
+ {{< /tab >}} {{< tab header="config.json" lang="json" >}}
44
46
{
45
47
"googleAnalytics": "PUT-YOUR-ANALYTICS-ID-HERE"
46
48
}
49
+
47
50
{{< /tab >}}
48
51
{{< /tabpane >}}
49
52
50
- {{% alert title="Important " color="warning" %}}
53
+ {{% alert title="Production-only feature! " color="warning" %}}
51
54
52
55
Analytics are enabled _ only_ for ** production** builds (called "environments"
53
56
in Hugo terminology). For the information Hugo environments and how to set
@@ -57,6 +60,21 @@ googleAnalytics: PUT-YOUR-ANALYTICS-ID-HERE
57
60
58
61
{{% /alert %}}
59
62
63
+ {{% alert title="Upgrade warning" color="warning" %}}
64
+
65
+ Earlier versions of Docsy recommended setting the
66
+ ` services.googleAnalytics.id ` config parameter to enable analytics. Upgrade
67
+ your configuration as outlined above. ** Do not** set both this parameter _ and_
68
+ the top-level ` googleAnalytics ` , otherwise this will likely result in
69
+ [ unexpected behavior] [ ] . For more details about how these two parameters are
70
+ related, see [ Is ` services.googleAnalytics.id ` an alias for
71
+ ` googleAnalytics ` ] [ alias-discussion ] .
72
+
73
+ [ alias-discussion ] : https://discourse.gohugo.io/t/config-is-services-googleanalytics-id-an-alias-for-googleanalytics/39469?u=chalin
74
+ [ unexpected behavior ] : https://github.com/google/docsy/issues/921
75
+
76
+ {{% /alert %}}
77
+
60
78
## User Feedback
61
79
62
80
By default Docsy puts a "was this page helpful?" feedback widget at the bottom of every
0 commit comments