Data Layer Events

Track Alby Generative QA events using dataLayer. Monitor user actions like message submissions, widget loads, viewports, and question clicks

To track events, the Alby Generative QA JavaScript widget pushes data to the dataLayer using the following format:

window.dataLayer.push({
event: "alby",
albyaction: event_type,
});
  • event: The value is always set to "alby" to indicate that the event is related to the Alby widget.
  • albyaction: This key corresponds to the specific event type being tracked.

These events published by the Alby Generative QA widget can be toggled on and off. When toggled off, no events will be sent to the dataLayer. Reach out to your Alby contact to enable dataLayer events.

Alby Events

alby-user-submitted-message

  • Description: Indicates a user-submitted message in a chat.
  • Usage: Triggered when a user submits a message in the chat interface.
window.dataLayer.push({
event: "alby",
albyaction: "alby-user-submitted-message",
});

Alby user submitted message event

alby-load-generative-qa

  • Description: Indicates a Generative QA widget has finished loading.
  • Usage: Triggered when the Generative QA widget is fully loaded.
window.dataLayer.push({
event: "alby",
albyaction: "alby-load-generative-qa",
});

alby-view-generative-qa

  • Description: Indicates a Generative QA widget has entered the user's viewport.
  • Usage: Triggered when the Generative QA widget becomes visible in the user's viewport.
window.dataLayer.push({
event: "alby",
albyaction: "alby-view-generative-qa",
});

alby-click-generative-qa-question

  • Description: Indicates a click on a question in the Generative QA widget to view the answer.
  • Usage: Triggered when a user clicks on a question in the Generative QA widget.
window.dataLayer.push({
event: "alby",
albyaction: "alby-click-generative-qa-question",
});

alby-click-generative-qa-question event