Welcome to the LimeSurvey Community Forum

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

Identify Response Times

  • Fran1991
  • Fran1991's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 9 months ago #218261 by Fran1991
Identify Response Times was created by Fran1991
Hello dear forum,

I am conducting a survey that I already have in production, however, reviewing my responses in the database I am noticing that there are some records where the response time is very short, the survey lasts between 8 and 10 minutes approximately but I have found with responses of less than 2 min, so my conclusion is that they really are not paying enough attention to answer this survey.

MY QUESTION:
Is there any way to be able to identify these short-lived responses and to redirect these surveys to a special link to register in the database?

I have used the Quotas section to redirect the links, but how to do it for short-duration surveys?

I appreciate any help or comments that can guide me to fix this.

Greetings,
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #218262 by tpartner
Replied by tpartner on topic Identify Response Times
This probably won't help with your live survey but off the top of my head...

- Record the start time in a hidden question in the first group
- Record the end time in a hidden question in the last group
- Use ExpressionScript to tailor the end URL depending on the elapsed time

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • Fran1991
  • Fran1991's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 9 months ago #218264 by Fran1991
Replied by Fran1991 on topic Identify Response Times
Hi, Tony,

Thanks for your prompt response.

As you can see I am still very new to LS.

I took a look at the manual to find a question related to this, but to my bad luck I couldn't find it.
Could you guide me in the way to know how I execute each of the questions, I want to know how I can register the start time and the end time, I understand that it must be in a hidden equation question that records both times.

But what would be the script for each record?

Thanks again for your valuable help.
The topic has been locked.
  • Fran1991
  • Fran1991's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 9 months ago #218288 by Fran1991
Replied by Fran1991 on topic Identify Response Times
Hello,

Checking some posts within the forum I found something that can help, I found this script that Tony helped write where he records the time and date from the beginning and until the end of the survey.

<script>
$(document).ready(function(){
if($('#question{QID} input:text:eq(0)').val() == '') {
$('#question{QID} input:text:eq(0)').val(new Date());
}
{
$('#question{QID}').hide();
}
});
</script>

So I asked two short text questions, one at the beginning and one at the end.

But now I am trying to perform the ExpressionScript
to redirect to my link. Does anyone have any idea how i can take this elapsed time?


I also do not know if with these two questions I can achieve it.

I appreciate again any help.
Hugs :)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #218322 by tpartner
Replied by tpartner on topic Identify Response Times
1) Place a hidden equation question in the first group containing this equation (let's use code "startTime" for this question). It uses the ExpressionScript time() function to load the current time measured in the number of seconds since the Unix Epoch. It also uses the is_empty() function to ensure that the start time is not updated when returning to the group.
Code:
{if(is_empty(startTime),  time(), startTime)}

2) Place a hidden equation question in the last group containing this equation (let's use code "endTime" for this question). It uses also the ExpressionScript time() function to load the current time measured in the number of seconds since the Unix Epoch. It will be updated when the survey is submitted.
Code:
{time()}

3) Place a hidden equation question in the last group containing this equation (let's use code "elapsedTime" for this question). It records the difference between startTime and endTime. It will also be updated when the survey is submitted.
Code:
{endTime - startTime}

4) Then you should be able to tailor the End URL something like this:
Code:
{if(elapsedTime < 120, 'URLfor speedsters', 'URL for normal responses')}

Sample survey attached (with equation questions shown for testing): 

File Attachment:

File Name: limesurvey...6(2).lss
File Size:20 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, holch, Fran1991
The topic has been locked.
  • Fran1991
  • Fran1991's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 7 months ago #219273 by Fran1991
Replied by Fran1991 on topic Identify Response Times
Thank you, Tony

It works perfectly.

I appreciate the help too much.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose