Javascript embedded data causing strange exported file | XM Community
Skip to main content
Edit: turns out the problem was with Excel. Reading the file into a statistical program worked fine.



I have set up some code in my survey, including setting some embedded data. But when I export the data into a CSV file, there are some rows that just have numbers in each column rather than the regular data such as start date, response type, etc. I am just getting started with Javascript and most of the code I got from elsewhere, including answers to questions here, and I'm having trouble figuring out where the problem is.



I have a lot of code that is all set to one question and I attached all of it as a png. But here are the lines that set embedded data:



Qualtrics.SurveyEngine.addOnPageSubmit(function(type)

{

if(type == "next")

{

Qualtrics.SurveyEngine.setEmbeddedData("xPos", delayedXPos.join());

Qualtrics.SurveyEngine.setEmbeddedData("yPos", delayedYPos.join());

Qualtrics.SurveyEngine.setEmbeddedData("time", delayedTime.join());

Qualtrics.SurveyEngine.setEmbeddedData("rectDims", rectDims);

}

});



xPos is a list of x coordinates of the mouse, yPos is a list of y coordinates of the mouse, time is a list of seconds, and rectDims is an array with four coordinates of an image that is added to the survey using HTML.



Any suggestions for figuring out the problem? Thanks!
Be the first to reply!

Leave a Reply