Is there a way to detect Qualtrics via JS? | Experience Community
Skip to main content
Solved

Is there a way to detect Qualtrics via JS?

  • May 17, 2021 4:16 PM UTC
  • 4 replies
  • 181 views

I am writing some code that needs to check if Qualtrics is "running". Is that possible?
i.e. if (QUALTRICS ==== LOADED) then ...

Best answer by takuhii

Actually, I have managed to answer my own question...
if (window.QSI != undefined) {
// DO SOMETHING
}
This code will act as a "loaded" trigger if you need something to happen once Qualtrics is loaded.

View original

4 replies

  • Author
  • Answer
  • May 27, 2021 8:32 AM UTC

Actually, I have managed to answer my own question...
if (window.QSI != undefined) {
// DO SOMETHING
}
This code will act as a "loaded" trigger if you need something to happen once Qualtrics is loaded.


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • May 27, 2021 10:11 AM UTC

I'm just wondering about the use case of this.
If it's within the survey scenario, wouldn't the Qualtrics' builtin functions suffice?


  • Author
  • May 27, 2021 10:35 AM UTC

Basically, we have a feedback button on our website that is unclickable if Qualtrics fails to load, so I wanted to be able to wrap it in a piece of code that basically check Qualtrics has loaded, so that the button displays (i.e. can be used), or stays hidden if Qualtrics doesn't load (i.e. is NOT usable).
The button triggers the survey BTW :)


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • May 27, 2021 12:04 PM UTC

Oh. Okay. Makes sense. I was wondering why you would need something like this in the survey itself.
Thanks.