Welcome to the LimeSurvey Community Forum

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

Prevent duplicate responses with open-access mode

  • jacob76
  • jacob76's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 4 days ago - 3 months 4 days ago #254890 by jacob76
Please help us help you and fill where relevant:
Your LimeSurvey version:  LimeSurvey Community Edition   Version 5.6.7+230222
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================
Hi everyone,

I have to integrate my survey with a professional survey panel provider that provides the participants and its ID for me. My final limesurvey link would look like this: 

http://localhost/limesurvey/index.php/369498?newtest=Y&lang=de&LSid="xxxxxx"

When we run the survey, this "xxxxxx" will be replaced with ID with 15 unique characters. 

If I make the survey with closed-access mode, people have to enter their IDs, which is the access code and can also prevent repeated responses, once they complete the survey or get screened out. The following image shows that they have to enter the ID/access code manually. 



However, my panel provider and my colleagues do not want to make the survey too complex and do not want survey participants to enter their access code. Therefore, I have to make the survey as open-access mode. All complete links or redirects links work well and the results are the same as the closed-access mode. The only problem is, in the open-access mode, the survey participants can repeat the survey, even with the unique ID in the URL. How could I fix this problem in an open-access mode? Is it possible?

Here is my survey participant settings. I disable "Allow multiple responses or update responses with one access code" and it also does not work in an open-access mode. 
 

Thank you very much for your help in advance! 
 
Last edit: 3 months 4 days ago by jacob76.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 4 days ago #254904 by DenisChenu
Replied by DenisChenu on topic Prevent duplicate responses with open-access mode
Quick answer : it's not possible.

More long answer :
  1. You can not send one link with token to your panel provider ? It's the best solution (some client create 100000 token and send it to panel provider)
  2. You know the time where the response is submitted : take only the 1st one when analysis (the endurl goes to your panel provider, they already know it's already answeres
  3. You can use a control on each group (except the 1st one with condition : {statCount("LSid") < 1}   and use Start URL for prefilling.
  4. you can replace LSid by token in beforeSurveyPage or beforeRegister event and autocreate the related token if not exist and redirect to this token.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: jacob76

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 4 days ago #254912 by Joffm
Hi,
as @Denis,
you may use the function "statcount".

On the other side:
A panel member is not very keen to fill a survey more than one time.
As he is not paid for it.
The panel provider knows the outcome of each participant.
He will not pay, moreover will fire this person for fraud.
And you will not be charged for these doubles.

Joffm

Hättest Du im deutschen Teil gefragt, wäre alles einfacher gewesen.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, jacob76

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 3 days ago #254924 by holch
If the panel provider wants to have an open access survey, it is their responsibility to prevent their panelists to participate more than once.

If it is your responsibility to prevent a panelist to participate more than once, then they need to let you use a closed survey.

However, if you do it right, as Denis and Joffm already described, you can make it a closed survey, but respondents do not have to type the token, it is just included in the survey link and automatically registered in Limesurvey.

So you basically create a large enough amount of dummy tokens (ask your panel provider how many they need) and then create the links. Unfortunately, Limesurvey still has no option (afaik) to export the complete token links via CSV (should be actually a very easy feature, because the links are already there, you can get them from the participant list in limesurvey).

To make it easier and so that you do not have to copy tens of thousands of links from the panel, you just copy the first, look at the structure and "recreate it" via Excel, using the token list that you can export as CSV and the structure of one link to create the other links accordingly. I've described this procedure a few times in the forum already. But it basically uses the function "concatenar" (in Portuguese, you must check what this is in English or German - who had this stupid idea to translate functions anyway, :-) ). I think you can also use '&' to join the different elements of the survey URL to get your individual links.

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

The following user(s) said Thank You: DenisChenu, jacob76

Please Log in to join the conversation.

More
2 months 1 week ago #256139 by davebostockgmail
Replied by davebostockgmail on topic Prevent duplicate responses with open-access mode
I would do this with the API and PHP ...

Use PHP as the starting link to capture the panel companies ID and then take that and use the API to add a record to the Participants table and have your survey run in closed mode.

Here is an example of a PHP file that will do that.

This requires that you have access to the server so you can create the link ... you will need to modify all the items in red in this file then it is simply a case of passing the link www.yoursurveyserver.com/IDCapture.php?Sid=xxxxx to the panel company.

<?php

$LS_USER='your username';
$LS_PASSWORD='your password';
 
require_once '../application/libraries/jsonRPCClient.php';
 
    $iSurveyID = your survey ID;
    $token = $_GEThe name of the variable containing the ID from the panel company[/color]']; 
    
    header("Location: your server address/your survey ID?token=".$token."&newtest=Y");

    $myJSONRPCClient = new JsonRPCClient('your server address/index.php/admin/remotecontrol');

    $sessionKey= $myJSONRPCClient->get_session_key( $LS_USER, $LS_PASSWORD );
    
     
        // Define the token params
        $tokenParams = array("email"=>"Respondent@Respondent.com","lastname"=>"LastName","firstname"=>"FirstName","token"=>$token,"emailstatus"=>"OK");
        $aParticipantData=array($tokenParams);
        $bCreateToken = false;
 
        // Create the token in survey
        $newToken = $myJSONRPCClient->add_participants( $sessionKey, $iSurveyID, $aParticipantData, $bCreateToken);
 
 
    // Release the session key
    $myJSONRPCClient->release_session_key( $sSessionKey );



?>

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 months 1 week ago #256736 by holch

http://localhost/limesurvey/index.php/369498?newtest=Y&lang=de&LSid="xxxxxx"


And you are not running this survey on Localhost, do you? The link you are posting will not work for panel respondents.

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

Please Log in to join the conversation.

More
2 months 3 hours ago - 2 months 3 hours ago #257519 by davebostockgmail
Replied by davebostockgmail on topic Prevent duplicate responses with open-access mode
Edited as my reading comprehension is not great.
Last edit: 2 months 3 hours ago by davebostockgmail.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 4 weeks ago #257552 by holch

Edited as my reading comprehension is not great.

When I received the notification I thought: "I seriously didn't see that it was Dave when I made that comment?"

Because as you are an experienced user, I wouldn't have made the comment. But we have seen it all here in the forum, with beginners wanting to run their survey from their personal computer via localhost. So I thought I'd just mention it, before it is too late. Wouldn't have made that comment to you, because I know you know. :-)

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

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose