Snowball sampling with LimeSurvey

More
4 months 2 weeks ago #186614 by lfanfoni
I'm planning a survey that uses "snowball sampling", where respondants recruit other respondants from among their acquaintances.
I thought I could use an "open" survey without participants, and to present an end page (after submission) to invite respondant to "share" the survey URL with others.
For my needs, I mainly thought of these 3 options:
- sending the URL survey via email
- sending the URL survey via whatsapp
- copy of the URL survey to clipboard
The survey URL should contain also a parameter for keeping track of propagation of responses, and for this I thought to use the SAVEDID as URL field.
Considering that I expect a large number of respondents from mobile devices, I was wondering if someone has already had to face similar functionality and if they can share the solution.

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
4 months 2 weeks ago - 4 months 2 weeks ago #186674 by jelo

lfanfoni wrote: The survey URL should contain also a parameter for keeping track of propagation of responses, and for this I thought to use the SAVEDID as URL field.


So your questions are:
1.) Generation of individual URLs
2.) Distribution of individual URLs

To 1.) Using the SAVEID alone is possible, but you might add data to the SAVEID or transform the SAVEID to prevent that wrong IDs are used (mistypes/manipulation).
LimeSurvey isn't offering a function to generate GUID (global unique IDs) out of the box. I'm not aware of a plugin for LimeSurvey.

This script will generate a complete GUID (which is not good for an URL), but you could use a smaller part of it and combine it with the SAVEID.

slavik.meltser.info/the-efficient-way-to...pt-with-explanation/
/**
    * Generates a GUID string.
    * @returns {String} The generated GUID.
    * @example af8a8416-6e18-a307-bd9c-f2c947bbb3aa
    * @author Slavik Meltser (slavik@meltser.info).
    * @link https://slavik.meltser.info/?p=142
    */
    function guid() {
        function _p8(s) {
            var p = (Math.random().toString(16)+"000000000").substr(2,8);
            return s ? "-" + p.substr(0,4) + "-" + p.substr(4,4) : p ;
        }
        return _p8() + _p8(true) + _p8(true) + _p8();
    }

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 4 months 2 weeks ago by jelo.
The following user(s) said Thank You: lfanfoni

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #186696 by lfanfoni
Thanks. I will try to adopt this kind of algoritm to save a unique ID and use this as URL parameter.
Regarding point 2, I've found some solutions for whatsapp and mail distribution in the end page:
api.whatsapp.com/send?text=SomeText : <site>/index.php/<survey_id>/invite/<GUID>"
mailto:?subject=Invitation to respond;body=SomeText: <site>/index.php/<survey_id>/invite/<GUID>"
I tried to implement also the copy to clipboard option, but javascript solution I've found doesn't work.
This is an online sample: www.cervelletta.it/limesurvey/index.php/445197
And this is source in the end page:

<p>Grazie per aver risposto all'indagine. Ti chiediamo di invitare altri tuoi amici a rispondere.</p>

<p>Invita altri su WhatsApp : <a data-action="share/whatsapp/share" href=" api.whatsapp.com/send?text=Rispondi anche tu a questa indagine: www.cervelletta.it/limesurvey/index.php/...h/wh/invite/{SAVEDID }"><img alt="Invita altri su WhatsApp" src="/limesurvey/upload/surveys/445197/images/whatsapp.png" style="vertical-align: middle; height: 30px; width: 30px;" /></a> </p>

<p>Invita per email: <a href="mailto:?subject=Invito a rispondere all'indagine XXXX&amp;body= Rispondi anche tu a questa indagine: www.cervelletta.it/limesurvey/index.php/...h/ml/invite/{SAVEDID }"><img alt="Invita altri per email" src="/limesurvey/upload/surveys/445197/images/email.png" style="vertical-align: middle; height: 30px; width: 30px;" /></a></p>
<input id="cpTxt" type="hidden" value=" www.cervelletta.it/limesurvey/index.php/...h/cl/invite/{SAVEDID }" />
<p>Copia nella clipboard e incolla dove vuoi tu per invitare: <img alt="Invita altri dopo aver copiato il link" onclick="cpText()" src="/limesurvey/upload/surveys/445197/images/clipboard.jpg" style="vertical-align: middle; height: 34px; width: 30px; cursor: pointer" /></p>
<button onclick="cpText()">Copy text</button>

<p><script type="text/javascript" charset="utf-8">
function cpText() {
/* Get the text field */
var copyText = document.getElementById("cpTxt");

/* Select the text field */
copyText.select();

/* Copy the text inside the text field */
document.execCommand("copy");

/* Alert the copied text */
alert("Testo copiato: " + copyText.value);
}
</script></p>

Aiutaci a far crescere la comunità italiana di LimeSurvey: vai sul forum Italiano per richieste e soluzioni citando sempre la versione usata, non scrivere in privato, suggerisci modifiche o nuove traduzioni - www.limesurvey.org/forum/italian-forum/118441

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #186717 by DenisChenu

jelo wrote: LimeSurvey isn't offering a function to generate GUID (global unique IDs) out of the box. I'm not aware of a plugin for LimeSurvey.

Plugin generateUniqId ;)

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!