You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/editing.md
+27
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,33 @@ have rearranged themselves to reflect that.
225
225
::::::::::::::::::::::::::
226
226
::::::::::::::::::::::::::::::::::::::::::
227
227
228
+
### Configuring web analytics
229
+
The optional `analytics` field can be used to configure web analytics, e.g. with [Matomo](https://matomo.org/) or Google Analytics.
230
+
There are currently three options for `analytics`:
231
+
232
+
1. `NULL`: disables tracking for that lesson. This is the default behviour, and is equivalent to omitting the `analytics` field from `config.yaml` altogether.
233
+
2. `carpentries`: adds the tracking script needed for the lesson to be tracked by The Carpentries self-hosted Matomo system.
234
+
This option works only for The Carpentries lessons: community-owned lessons cannot be tracked in the same way.
235
+
3. `<user_string>`: allows the user to define their own tracker script string.
236
+
For legibility, use the `|` symbol to indicate that the value of the YAML field will be split across multiple indented lines ([known as a 'literal block' in YAML](https://stackoverflow.com/a/21699210)).
237
+
For example, to configure for Google Analytics:
238
+
239
+
```yaml
240
+
analytics: |
241
+
<!-- Global site tag (gtag.js) - Google Analytics -->
0 commit comments