Sienna includes a lightweight, built-in analytics bridge that allows you to monitor how your users interact with accessibility tools. This feature is exclusive to Pro and Enterprise plans.
1. Google Analytics 4 (GA4) Bridge
Sienna features automatic “Plug & Play” support for Google Analytics. There is no configuration required.
How it works:
- Auto-Detection: If your website has Google Analytics (GA4) installed, the widget will automatically detect it and start reporting events (e.g., when a user toggles High Contrast).
- Minimalist: It hooks directly into your existing
window.gtagfunction without loading any additional external scripts.
2. Generic Event Tracking (Custom Integration)
For teams using custom analytics solutions (Mixpanel, Hubspot, Segment, etc.), Sienna dispatches a specific Event on the window object called sienna_analytics_event.
Implementation Example
window.addEventListener('sienna_analytics_event', function(e) {
const { event, data, timestamp } = e.detail;
console.log(`[Sienna] Received ${event}:`, data);
// Example: Forward to Mixpanel
// mixpanel.track(event, data);
});
3. Event Registry & Payloads
| Event Name | Fired When… | Data Payload Example |
|---|---|---|
widget_loaded | The script finishes loading and the trigger button appears. | {} |
widget_opened | The user clicks the main floating action button. | {} |
tool_toggled | A tool (e.g. High Contrast) is turned ON or OFF. | {"tool": "contrast", "active": true} |
profile_activated | A preset profile (e.g. Vision Impaired) is selected. | {"profile": "vision", "active": true} |
language_changed | The user selects a different language from the dropdown. | {"language": "fr"} |
settings_reset | The user clicks “Reset Settings” to clear all tools. | {} |
4. Opting Out
Tracking is enabled by default for all paid plans. If you wish to disable the analytics bridge entirely, add the following attribute to your script tag:
<script src="..." data-asw-analytics="false" async></script>