Solved
Get page URL when using Qualtrics in iFrame?
I am including a Qualtrics survey in an iFrame on an external page, as in this question, which seems to work great.
I'd like to collect the URL for the page the iFrame appears on, however. Is this possible?
My current idea: can I populate a hidden question/answer with JavaScript?
Best answer by TomG
You can use an embedded variable (initialize the variable in survey flow). Try this JS (untested):
```
var parentUrl = (parent != window) ? document.referrer : "";
Qualtrics.SurveyEngine.setEmbeddedData("parentUrl", parentUrl);
```
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.



I used TomG's JS, which was perfect.
Then I had to add the "Embedded Data" thing in Survey Flow, set to "parentUrl".
Works good now. Thanks.
and then added the suggested JS to one of the questions: