Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Redirects using OTX IDs

  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135622 by CGPsurvey2016
Redirects using OTX IDs was created by CGPsurvey2016
For our survey we are paying a research company to send us respondents, but they require that an "OTX ID" be passed back through their system through redirects so that each respondent is associated with an individual code that will inform the company whether they completed the survey. Has anyone done this before? Do I use tokens perhaps?

Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #135626 by holch
Replied by holch on topic Redirects using OTX IDs
You will use the panel integration feature. You save their ID in a question and you pass it on through the end URL (also for quota, etc.).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135628 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I don't see that option under settings. Is it maybe because our university is still using version 1.92?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #135629 by holch
Replied by holch on topic Redirects using OTX IDs
exactly. This is a newer feature.

For older versions it is a bit more complicated and will need some Javascript if I recall right. There should be some information in the workaround section of the manual.

Basically you need to pass the ID as a variable via the survey URL, read it into a hidden question, then in the end URL include it as a variable to the link your panel provider is providing you. There should be a few older posts in the forum about this (passthrough variables, endurl, etc.)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135683 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
Thanks, I looked up the PASSTHRU values system and it seems to be working just fine.
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135822 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I'm having a related problem now: even though the redirects appear to be successful, I can't seem to read the OTX IDs into a hidden question. As suggested I looked up the problem and found this previous thread: www.limesurvey.org/forum/can-i-do-this-w...of-a-url-in-the-data . Therefore I created a hidden short free text question called "ID" on the first page, went to the "Question" source and copied in:

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

// Hide the question
$('#questionID').hide();

// Get the URL param
var otx_id = getURLParameter('otx_id');

// Load the hidden question
$('#questionID input.text').val(otx_id);
});

</script>


However looking at the responses I just see an empty column. I emailed our university IT and they told me that "the option "Filter HTML for XSS" is already disabled globally on every survey so there is no need to try to turn it off". I'm not sure what else I need to do in order to get this to work - any ideas?

Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #135824 by holch
Replied by holch on topic Redirects using OTX IDs
How did you hide the "hidden" question? Via CSS/Javascript or in the advanced settings? Because if you hide it in the advanced settings the question does not appear in the source code, thus javascript can not include the code into the question.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135828 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I hid it in the advanced settings. Could you possibly link me to how to hide it the proper way? Thanks!!
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135833 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
Oh, I guess the Javascript hide is already included in the above code. I'll try simply unhiding it in the general settings and see if that works.
The topic has been locked.
  • CGPsurvey2016
  • CGPsurvey2016's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #135835 by CGPsurvey2016
Replied by CGPsurvey2016 on topic Redirects using OTX IDs
I returned the general settings to normal, but for some reason the question isn't hidden on the opening page even though $('#questionID').hide(); is in the script.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #135836 by holch
Replied by holch on topic Redirects using OTX IDs
I think in your script you need to subsitute "questionID" manually with the question ID. There should be some scripts that take this question ID automatically. I am no Javascript expert though.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #135838 by holch
Replied by holch on topic Redirects using OTX IDs
If you look at the original post "You can load it into a hidden short-text question. Replace "QQ" with the short-text question ID."

But this post is 4 years old. There might have been some changes to the structure of the survey templates.

Which Limesurvey version and which template do you use??

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose