app/assets/docs/analytics.md in govuk_frontend_toolkit-4.18.4 vs app/assets/docs/analytics.md in govuk_frontend_toolkit-5.0.0
- old
+ new
@@ -72,9 +72,14 @@
// Track a custom path
GOVUK.analytics.trackPageview('/path');
// Track a custom path and custom page title
GOVUK.analytics.trackPageview('/path', 'Title');
+
+// As above, plus additional options passed into the `pageview` call
+GOVUK.analytics.trackPageview('/path', 'Title', {
+ sessionControl: 'start'
+});
```
## Custom events
> Event tracking allows you to measure how users interact with the content of your website. For example, you might want to measure how many times a button was pressed, or how many times a particular item was used.