Extract data from referrer URL

More
1 month 2 weeks ago #188449 by Florian_Hannover
Hi team,

I just wanted to ask if it's possible to extract data from the referrer URL right in the survey - or even better to use a part of the referrer URL as the token being used.

The reason is that we can not pass any information via the URL from the distribution system. So the only way we have is to use the referrer URL to pass some information into limesurvey.


Thanks for your help,
Florian

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks ago #188454 by DenisChenu
Not currently in LimeSurvey

But more :
1. You can not be sure referrer url is OK : for example : i never send (by default) any referrer
2. Some website have way to remove referrer from any link.

Why not add a different url on all website ?

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188460 by Florian_Hannover
Hi and thanks for your reply!

The reasons I would like to use the referrer URL is that I have not other option. It's not possible to pass any information through the survey URL. But in other surveys I have seen that the majority of participants do send referrer URL information. Might be due the fact that we place the survey via iframe on our website.

As there is no way to pass information via survey link, I assume there is no other way to pass information to the survey.

Thank you very much for your input.
Florian

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188461 by DenisChenu
I don't understand :
Referrer url mean you put the link on a specific website ? No ? Then why not use prefill url

As there is no way to pass information via survey link, I assume there is no other way to pass information to the survey.

manual.limesurvey.org/URL_fields/en#Pref...using_GET_parameters

There are,

Create a question code «web» for example, and add ?web=A in the url of website A or ?web=B in the url of website B

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 .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: gabrieljenik

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago - 1 month 2 weeks ago #188464 by jelo
Replied by jelo on topic Extract data from referrer URL

Florian_Hannover wrote: But in other surveys I have seen that the majority of participants do send referrer URL information.

What information do you want to extract from the referrer?

The idea to use extracted parts as a token is a strong indication, that we might talk about different things.
en.wikipedia.org/wiki/HTTP_referer

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 1 month 2 weeks ago by jelo.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188474 by Florian_Hannover
Hi both,

thank you for your answers!
I know that limesurvey is able to pass information via survey link. But our distribution system is not able to pass those information - so this is not an option.

The idea was to extract a specific part from the referrer URL to use this as the survey token.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188477 by jelo
Replied by jelo on topic Extract data from referrer URL

Florian_Hannover wrote: The idea was to extract a specific part from the referrer URL to use this as the survey token.

You could create an external PHP script, which is the used as invitation URL.
People click the URL to the PHPScript. The PHPscript extracts the referrer and place the token in the LimeSurvey survey URL and redirect the browser to the LimeSurvey installation.

What will happen when the referrer is suppressed by the browser. The PHPscript needs to place a special token into the URL to prevent that people can still access the survey.

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

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188486 by gabrieljenik
May I suggest maybe creating a Plugin that extracts info from Referrer and unpacks it on the token or on the response?

If not, maybe simpler, what about setting cookies?
www.encuesta.biz/en/product/limesurvey-question-cookies/

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188489 by DenisChenu

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #188496 by gabrieljenik
Nice!

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188506 by Florian_Hannover
Hi all and thank you - especially DenisChenu!

I have absolutely no clue how to use this one though. :(
Could give briefly explain how to use it (where and how to place this script, needs to adapt it etc.)

That would be very helpful!

Thank you very much,
Florian

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188508 by DenisChenu
Hi Florian,

You can't … Gabriel idea is OK : must create a plugin. It's really easy in 4.0 because you have a event for this.

In 3.X and before you must write a plugin from Scratch (or contact a Partner for this …).
More difficult.

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188509 by Florian_Hannover
:dry: ok, but unfortunately, not for me. I would drop it and try to find another way. Thank you all for your help anyway. :)

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188512 by DenisChenu

DenisChenu wrote: (or contact a Partner for this …).

www.limesurvey.com/customization ;)

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #188515 by Florian_Hannover
Would be great if it's that simple. ^^ Thank you very much.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!