Back to guides

Sending widget usage data to your Analytics Dashboard

Easily incorporate widget usage statistics into their analytics dashboards, such as Google Analytics, Tableau, and more.

UserWay provides the following widget statistics:

You just need to set a PostMessage listener to receive these events. UserWay’s widget sends PostMessage events with the following  event payloads:

Widget opened:

{
  "event": "customEvent",
  "eventCategory": "userway",
  "eventAction": "widget open",
  "eventLabel": `${PAGE_URL}`
}

Accessibility Profile Selected:

{
  "event": "customEvent",
  "eventCategory": "userway",
  "eventAction": "profile selection",
  "eventLabel": `${PROFILE_NAME}`
}

Accessibility Feature Enabled:

{
  "event": "customEvent",
  "eventCategory": "userway",
  "eventAction": "ability enablement",
  "eventLabel": `${FEATURE_NAME}`
}

The target pages must set the PostMessage listener to receive these events:

window.addEventListener('message', function (event) {
  if (event.data.eventCategory === 'userway') {
    // Custom logic
  }
})

Explore UserWay’s Accessibility Widget