Show creative per javascript event | XM Community
Skip to main content
Question

Show creative per javascript event

  • March 3, 2020
  • 3 replies
  • 240 views

So I want to fire different creative based on javascripts events. As far as I understood I need to add this kind of logic https://prnt.sc/rb0anh . But it doesn't work for me. I tried different ways like <b>QSI.API.Events.push('hello_world') / window._qsie.push('hello_world') / document.dispatchEvent(new Event('hello_world') </b> . Am I missing something or it doesn't work as I expect?

3 replies

  • Author
  • March 10, 2020
any ideas?


ZachShearer
Level 1 ●
Forum|alt.badge.img+2
  • Level 1 ●
  • June 20, 2023

I was able to get this to work using the following JavaScript. 

window._qsie = window._qsie || [];window._qsie.push('survey-qualified-contact-us');


You can see the intercept triggering logic set up here: 

 

 

You can debug the events on the page using the following method. 

QSI.EventTracker.counts

// Result below.
{
"eventName": 1,
"qualified-contact-us": 1,
"survey-qualified-contact-us": 5,
"undefined": 1
}