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