Welcome to the LimeSurvey Community Forum

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

Extract data from referrer URL

  • Florian_Hannover
  • Florian_Hannover's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188449 by Florian_Hannover
Extract data from referrer URL was created 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #188454 by DenisChenu
Replied by DenisChenu on topic Extract data from referrer URL
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 .
I don't answer to private message.
The topic has been locked.
  • Florian_Hannover
  • Florian_Hannover's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188460 by Florian_Hannover
Replied by Florian_Hannover on topic Extract data from referrer URL
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #188461 by DenisChenu
Replied by DenisChenu on topic Extract data from referrer URL
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 .
I don't answer to private message.
The following user(s) said Thank You: gabrieljenik
The topic has been locked.
More
4 years 7 months ago - 4 years 7 months 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: 4 years 7 months ago by jelo.
The topic has been locked.
  • Florian_Hannover
  • Florian_Hannover's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188474 by Florian_Hannover
Replied by Florian_Hannover on topic Extract data from referrer URL
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.
The topic has been locked.
More
4 years 7 months 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
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
4 years 7 months ago #188486 by gabrieljenik
Replied by gabrieljenik on topic Extract data from referrer URL
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/

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

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #188489 by DenisChenu
Replied by DenisChenu on topic Extract data from referrer URL

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.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
4 years 7 months ago #188496 by gabrieljenik
Replied by gabrieljenik on topic Extract data from referrer URL
Nice!

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

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • Florian_Hannover
  • Florian_Hannover's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188506 by Florian_Hannover
Replied by Florian_Hannover on topic Extract data from referrer URL
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #188508 by DenisChenu
Replied by DenisChenu on topic Extract data from referrer URL
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 .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose