Triggering Custom Events for Session Replay
What's on this page
About Triggering Custom Events for Session Replay
Once you’ve configured custom events in the Session Replay section, you’ll need to trigger (or “emit”) the events on your website. If your website uses a tag manager, you may be able to leverage your existing events in that platform to easily trigger a Qualtrics custom event.
On this page, you’ll find examples of how to do this for Google Tag Manager and Adobe Launch. There’s also a Javascript solution that can be used in your website’s product code if you don’t have a tag management solution.
Attention: Custom coding features are provided as-is and require programming knowledge to implement. Qualtrics Support does not offer assistance or consultation on custom coding. You can always try asking our community of dedicated users instead. If you’d like to know more about our custom coding services, please contact your Qualtrics Account Executive.
Triggering Custom Events with Google Tag Manager
Triggering Events Using Adobe Launch
Triggering Events Using Javascript
Qualtrics uses the W3C Standard Custom Event interface, which makes it easy for your engineering team to emit an event that Qualtrics can observe.
Example: Imagine a banking website that already has code that triggers whenever a user creates a new checking account. Your web development team adds a new custom event with the key “newCheckingaccount:”
All your engineering team would need to do is add the following two lines of code:
var dxaEvent = new CustomEvent("newCheckingaccount", {bubbles: true});
document.dispatchEvent(dxaEvent);This way, Qualtrics can associate these events with sessions on your website. No API tokens, authentication, or additional third-party code is required.
Attention: Please note the {bubbles: true} part of the code above. It’s important that these Custom Events “bubble” (or increase) so that Qualtrics can listen to them.
FAQs
What is an event key?
What is an event key?
How do I find my event key?
How do I find my event key?
That's great! Thank you for your feedback!
Thank you for your feedback!