Welcome to the LimeSurvey Community Forum

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

need to show a tracking code in end message to the participant

  • hmd_bakhshi
  • hmd_bakhshi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 1 month ago #179760 by hmd_bakhshi
Hi
I'm using ls3 in surveys with anonymous participants. but sometimes they argue that they fill and submit the survey but I do not receive at server. I need a unic tracking code which show at end message to the participants.
does ls3 have such this code (like seed) by which I can use it at the end message? and how can I use it
thanks
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179761 by Joffm
Hi,
well, you can create a random number by "{rand(100000,999999)"}

Or you create an alphanumeric string with six (or seven, or eight,...)random numbers (0,25) to get characters.
Like:
{join(substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1))}

In your end message just pipe this value.

Of course, you cannot be sure that all calculated values are unique.
But if you code is long enough it will do it.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179763 by holch
Why not just use the SAVEDID? This is a truly unique number and it let's you easily identify the responses in the database.

However, this also means if they get back to you with this ID, the survey is not anonymous anymore, because now you can connect their responses to their person.

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

The topic has been locked.
More
5 years 1 month ago #179768 by jelo

holch wrote: Why not just use the SAVEDID? This is a truly unique number and it let's you easily identify the responses in the database.

I don't recommend the SAVEDID as an PIN. Easily to guess, easily to mistype. If the respondent is actively seeking the confirmation of submission and don't want to reveal the data, just choosing a savedid below the own would be enough.
Depending on the survey topic an easily guessable PIN can cause a lot of trouble.
I would e.g. add three random characters to the SAVEDID to prevent easy guessing.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179793 by holch

Easily to guess, easily to mistype.


Not sure how someone will guess the SAVEDID. Usually the users don't have access to the SAVEDID. If you show it to them only at the end of the survey, where is the harm? How should they guess it? Not sure if I understand you wrong.

But I agree, it is probably better to add some random numbers at the beginning or the end, just to be save.

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

The topic has been locked.
More
5 years 1 month ago #179795 by jelo

holch wrote: Not sure how someone will guess the SAVEDID. Usually the users don't have access to the SAVEDID. If you show it to them only at the end of the survey, where is the harm?


I don't know the scenario and the impact a wrong number can have.

But when you complete the survey, you get the SAVEDID displayed.
Since it is a anonymous survey, you can fill out the survey once again. You get a SAVEDID again.
The pattern of +1 increments is easily recognized.

Depending on the reason you need to prove participation via the SAVEDID, it might be wise to not use SAVEDID.
Beside malicious intention sloppiness is a good reason to not use SAVEDID for participants. They might just note or remember the SAVEDID wrong. With an increasing number the chance for mismatch is quite high.

Perhaps LimeSurvey can provide another seedvariable for such a purpose out of the box.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179797 by holch
Thanks Jelo for the clarification. Your points make total sense.

Maybe a combination of Joffm's solution and the SAVEDID might make sense. But you need to make sure to save this generated code into a question. Otherwise it is of no use.

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

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179814 by DenisChenu

jelo wrote: Perhaps LimeSurvey can provide another seedvariable for such a purpose out of the box.

Easi way to do it in plugin using secure.php.net/manual/fr/function.uniqid.php
in an hidden short text question

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.
More
5 years 1 month ago #179819 by jelo
To expose these php functions to ExpressionScript would be a step forward.
An option "expose_php_function", where you could define the php function and the ExpressionScript function name (often identical, but to prevent name collisions in the future).

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #179822 by DenisChenu

jelo wrote: To expose these php functions to ExpressionScript would be a step forward.
An option "expose_php_function", where you could define the php function and the ExpressionScript function name (often identical, but to prevent name collisions in the future).

Not needed here :)

But : github.com/LimeSurvey/LimeSurvey/pull/1081

We CAN NOT expose whole php function, because
1. It can be dangerous
2. We need same function in javascript and php

Denis

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.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 1 month ago #179825 by tammo
Hi Joffm,

this looks like a "poor man's token creator". But since there is already a token mechanism, could that be used. Like filling a hidden text question with a generated token. That could also help with follow up research...

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
More
5 years 1 month ago #179826 by jelo

DenisChenu wrote: We CAN NOT expose whole php function, because
1. It can be dangerous

That's why I proposed a positive list and not a complete exposition.
The Javascript support is a valid point.

On the other hand. ExpressionScript stayed unchanged for years. Seems to be no problem for most users. The others learn PHP or choose a survey tool with complete scripting support.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose