diff --git a/app/javascript/matomo_tracking.js b/app/javascript/matomo_tracking.js index 5b17bf1c..c2ef7619 100644 --- a/app/javascript/matomo_tracking.js +++ b/app/javascript/matomo_tracking.js @@ -5,8 +5,8 @@ // // CLICK TRACKING // Add `data-matomo-click="Category, Action, Name"` to any element to track -// clicks as Matomo events. The Name segment is optional. We have a convention -// of using semicolons inside Name to divide multiple values. +// clicks as Matomo events. We have a convention of using semicolons inside Name +// to divide multiple values. This is purely for consistency. // // This tracking can be placed directly on an interactive element. // Tracking also works if placed on a container. The script will look @@ -16,22 +16,22 @@ // // Examples: // Download -// +// // // Event delegation on `document` means this works for elements loaded // asynchronously (Turbo frames, content-loader, etc.) without re-binding. // // SEEN TRACKING // Add `data-matomo-seen="Category, Action, Name"` to any element to fire a -// Matomo event when that element becomes visible in the viewport. The Name -// segment is optional. We have a convention of using semicolons inside Name -// to divide multiple values. Each element fires at most once per page load. +// Matomo event when that element becomes visible in the viewport. We have +// a convention of using semicolons inside Name to divide multiple values. +// Each element fires at most once per page load. // Works for elements present on initial page load and for elements injected // later by Turbo frames or async content loaders. // // Examples: //