Welcome to the LimeSurvey Community Forum

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

Snowball sampling with LimeSurvey

  • lfanfoni
  • lfanfoni's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 9 months ago #186614 by lfanfoni
Snowball sampling with LimeSurvey was created 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.

Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
The topic has been locked.
More
4 years 9 months ago - 4 years 9 months ago #186674 by jelo
Replied by jelo on topic Snowball sampling with LimeSurvey

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/
Code:
/**
    * 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 years 9 months ago by jelo.
The following user(s) said Thank You: lfanfoni
The topic has been locked.
  • lfanfoni
  • lfanfoni's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 9 months ago #186696 by lfanfoni
Replied by lfanfoni on topic Snowball sampling with LimeSurvey
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 : /index.php//invite/"
mailto:?subject=Invitation to respond;body=SomeText: /index.php//invite/"
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 }">Invita altri su WhatsApp



<p>Invita per email: <a href="mailto:?subject=Invito a rispondere all'indagine XXXX&body= Rispondi anche tu a questa indagine: www.cervelletta.it/limesurvey/index.php/...h/ml/invite/{SAVEDID }">Invita altri per email


<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>

Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #186717 by DenisChenu
Replied by DenisChenu on topic Snowball sampling with LimeSurvey

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 .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose