0

Thanks for taking a look at this. My task at hand is to put a html page in qualtrics, as an iframe (is the current thinking), and from that to see if I can get user data through event tracking to be sent to Google Analytics. So far, I understand how to send events to GA, and I'm working on the Custom Dimensions, but I have to wait a day to see if that's worked.

What I need though, is a unique ID, which I generate with qualtric's random number generator php. I need this unique ID to be sent to Google Analytics so that I can identify who's doing what on the embedded page. So I've looked at the Qualtrics javascript stuff, and I can get qualtrics itself to generate the id through javascript:

<script language="javascript">
var user = '${e://Field/user}';
document.write (user);
</script>

This works to just display the number in Qualtrics, but I know I'm missing a huge step, because implementing the same thing in an embedded webpage won't work - will it? I've tried, without success, and I've even used the

Qualtrics.SurveyEngine.addOnload(function()
{});

without success.

If you have any suggestions, that would keep the user in Qualtrics, but pass the embedded data for a unique individual's user events on an embedded webpage to GA, I'm all ears. Any reconceptualizing is cool to.

I'm just trying to figure out who is doing what on my embedded pages (iframed webpages) in Qualtrics.

Maybe this source will help: http://ut1.qualtrics.com/WRAPI/QuestionAPI/classes/Qualtrics%20JavaScript%20Question%20API.html

Thank you very much for any advice or direction.

655321
  • 411
  • 4
  • 26
  • Do you have access to put code within the iframe? Is the iframe hosted on your domain or Qualtrics? – Blexy Nov 21 '13 at 19:31
  • @Blexy I can definitely put code in the iframe, but the iframe is hosted on my domain and not Qualtrics. I'm thinking that if I can get the iframe to append the Qualtrics url with a field, then Qualtrics can read that field. So I create some random number generator in the iframe itself, and append that random number to the url, as well as sending that number and other dimensions to GA. I think this might work, but I'm currently trying to figure out how to do it without reloading the page... – user2600699 Nov 21 '13 at 21:58
  • Sorry, it doesn't look like just placing the field parameter to the url will allow Qualtrics to read it. It needs to load an actual page with the parameter so like http://www.qualtrics.com/?SID=SV_2rSHau&uniqueid=123ABC – user2600699 Nov 21 '13 at 22:24
  • You could always grab the uniqueid from the url and put it into a custom dimension. You have the ability to add google analytics to the survey? – Blexy Nov 21 '13 at 22:29
  • @Blexy - Right, I'm at this point now; trying to find a script that allows for an iframe to call its parent and get the querystring. I've been looking for something using document.referrer because that worked to at least pull the url before, but no luck - you don't happen to have a link to suggest do you? Thanks! – user2600699 Nov 22 '13 at 00:41
  • Did you see this [access parent url from iframe](http://stackoverflow.com/questions/3420004/access-parent-url-from-iframe)? Is both your iframe and the parent on the same subdomain? – Blexy Nov 22 '13 at 00:51
  • @Blexy - thanks for the response - i think they're on different subdomains; i found that using `code`var userid =document.referrer.split('=')[2];`code` worked for me to pick out the querystring of interest. I'm then putting that into a custom dimension for GA and hoping it shows up tomorrow! – user2600699 Nov 22 '13 at 01:47

0 Answers0