Check out the LimeSurvey source code on GitHub!

How to track filling in a survey

5 years 11 months ago #57870 by bolero
I've done a bit of research in this forum and in the documentation and I think I know some points I need to know, but not all. So I am undecided which approach to take. I have the following requirements for a survey:

People have to do the survey before they can use an online application. Furthermore, as this is a long-term scientific project, they will get a "first-time" survey and every half-year another survey (that one will probably be always the same or very similar). They will probably not get email invitations specifically for the survey. Instead, after they login to our application they will be asked to take the survey with a link to the survey and won't be able to use the application until they finished the survey.

So, I have to make sure to know if the survey was taken. I thought of using an internal customer id we have for each user, anyway. I see that there are probably two ways I can do that: either by prefilling a hidden question via the survey start URL or by using a "token-on-the-fly".

I've looked over the documentation about tokens briefly. If I understand correctly when using the on-the-fly approach I can use *my* token which in this case would be the customer id. Looks perfect. I'm not clear what disadvantages the use of a token might have, though. Can you tell me any without knowing more about the survey in question? If I understand correctly a normal token has some registration information associated with it. Can I go without that when using on-the-fly tokens? (I do not want that the user has to fill in some information we already have.)

Then, once the survey is taken I, of course, have to know it was finished. There is a feature to load a specific URL at the end, but I fear I can't use it because I would need it to tell me that customer id. Is there a way to return the token (if I use the token approach) in that URL? Or can I grab some data from the session? The survey will be called in the same browser window as the original session in our application and it would return to that session. If Limesurvey uses the standard PHP session management this should all be the same session.

Another approach might be to query the survey database on return if there is a completed survey for that user/token. For that I would need to know how I can identify a completed survey.

Thanks for any hints about the best approach.

Please Log in to join the conversation.

5 years 11 months ago #57876 by holch
I am not sure about "on the fly tokens", but this should explain your questions about the end url: --> Endurl

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

5 years 11 months ago #57877 by bolero
Yes, this answers the endurl topic quite positive. I did not find it earlier. Thanks a lot! I think I've now also increased my knowledge about tokens. I've activated a test survey and used the newtoken.php file to successfully create a new token and associated (dummy) record and take a survey. As I understand I might be able to fill the remaining record fields (name, email address etc.) later directly if there is a need.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form