Welcome to the LimeSurvey Community Forum

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

Post purchase survey

  • wakizashi
  • wakizashi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago - 1 year 6 months ago #242295 by wakizashi
Post purchase survey was created by wakizashi
Please help us help you and fill where relevant:
Your LimeSurvey version: Community edition 6.0.0+230405
Own server or LimeSurvey hosting: On premise
Survey theme/template: default
==================
Hi everyone, we would like to create a post purchase survey, you probably seen this few questions (or smileys) but would like to restrict user to one submission. Now, I know that there is an option to create tokens, but in this case it would require tight integration with our ecomm software, so I was thinking something like this. User gets the URL in form /index.php/surveyid/?cartid=123456 where GET parameter cartid would serve as a unique token. So once the answers have been submitted, next time when opening URL that survey would be disabled as already submitted. Has anyone done something similar or have the suggestion on how to do it?
Thanks in advance
Last edit: 1 year 6 months ago by wakizashi.

Please Log in to join the conversation.

More
1 year 6 months ago - 1 year 6 months ago #242298 by jelo
Replied by jelo on topic Post purchase survey
LimeSurvey 6 is pretty new, so a lot of workarounds and plugins are not tested.

You might can combine a few plugins to allow to automatically create a token with the cartID as attribute and can change the usage of token to restrict revisiting the survey once it is submitted.

The developer of these plugins is an active member of this forum here. He might found this thread soon and can provide some insight.

The relevant ones might can be found here:
gitlab.com/SondagesPro/TokenManagement

gitlab.com/SondagesPro/SurveyAccess

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

Please Log in to join the conversation.

  • wakizashi
  • wakizashi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago - 1 year 6 months ago #242300 by wakizashi
Replied by wakizashi on topic Post purchase survey
Thanks for the quick reply Jelo!

We are not limited to v6 really. I have used Lime Survey previously, and automatically went for the latest release. I can easily downgrade to whatever would make this easier as I have literally just installed it :)
Thanks again for the input

Edit: Actually downgrading now to 3.28.56+230404
Last edit: 1 year 6 months ago by wakizashi.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #242301 by Joffm
Replied by Joffm on topic Post purchase survey
Since 5.x. there is the plugin "statFunctions" included, that give you an easy way to decide whether the GET parameter was used already.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: wakizashi

Please Log in to join the conversation.

  • wakizashi
  • wakizashi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago #242302 by wakizashi
Replied by wakizashi on topic Post purchase survey
Hi Joffm, thanks for the input, going for the version 5.x then :)
For anyone else lurking here, please don't hesitate to share your ideas

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #242310 by tpartner
Replied by tpartner on topic Post purchase survey
Maybe send the participant to a PHP page that uses the API add_participants() method to add a token (based on the cartid) and redirect to the survey.

- api.limesurvey.org/classes/remotecontrol...hod_add_participants

Here is an old example missing the redirect - forums.limesurvey.org/forum/development/...-custom-token#193943

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: wakizashi

Please Log in to join the conversation.

  • wakizashi
  • wakizashi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago #242358 by wakizashi
Replied by wakizashi on topic Post purchase survey
Thanks, that piece of code is perfectly usable, I should be able to adopt it to suit our needs (to redirect if token exists or has been just created, maybe even add a sanity check to see if existing token has already submitted the answers)
So basically I can simply redirect to the survey and append the &token=<user_token> to avoid entering it manually, right? I mean, from what I have tried it works, just wondering if that would be a proper implementation...

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 6 months ago #242365 by tpartner
Replied by tpartner on topic Post purchase survey

So basically I can simply redirect to the survey and append the &token=<user_token> to avoid entering it manually, right? I mean, from what I have tried it works, just wondering if that would be a proper implementation...

Yup, appending a valid token to the survey URL will bypass the token-entry screen.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose