Skip to content

Commit dbb7815

Browse files
committed
Add "upgrade warning"
1 parent 4367665 commit dbb7815

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

userguide/content/en/docs/Adding content/feedback.md

+23-5
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ Add the following site parameter to your project's configuration file:
3535
{{< tabpane persistLang=false >}}
3636
{{< tab header="Configuration file:" disabled=true />}}
3737
{{< tab header="config.toml" lang="toml" >}}
38+
3839
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+
4143
googleAnalytics: PUT-YOUR-ANALYTICS-ID-HERE
42-
{{< /tab >}}
43-
{{< tab header="config.json" lang="json" >}}
44+
45+
{{< /tab >}} {{< tab header="config.json" lang="json" >}}
4446
{
4547
"googleAnalytics": "PUT-YOUR-ANALYTICS-ID-HERE"
4648
}
49+
4750
{{< /tab >}}
4851
{{< /tabpane >}}
4952

50-
{{% alert title="Important" color="warning" %}}
53+
{{% alert title="Production-only feature!" color="warning" %}}
5154

5255
Analytics are enabled _only_ for **production** builds (called "environments"
5356
in Hugo terminology). For the information Hugo environments and how to set
@@ -57,6 +60,21 @@ googleAnalytics: PUT-YOUR-ANALYTICS-ID-HERE
5760

5861
{{% /alert %}}
5962

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+
6078
## User Feedback
6179

6280
By default Docsy puts a "was this page helpful?" feedback widget at the bottom of every

0 commit comments

Comments
 (0)