Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:survey:url [20.01.2016 14:03] – [Interview Token (t)] adminen:survey:url [04.06.2019 10:22] – [Parameters] admin
Line 3: Line 3:
 Every website needs its URL. So does your questionnaire. To lead questionees to your questionnaire, they will need this adress. This chapter gives tips on how to best use the URL and what possibilities you have. Every website needs its URL. So does your questionnaire. To lead questionees to your questionnaire, they will need this adress. This chapter gives tips on how to best use the URL and what possibilities you have.
  
-===== The questionnaire's URL =====+===== The survey's URL =====
  
 The URL of your questionnaire is put together from SoSciSurvey's URL (''%%https://www.soscisurvey.de%%'') and the project directory (e.g. ''demo''). Between those components is a slash (''/''). There is a slash at the end of the address as well, because the address refers to a directory, not a file: ''%%https://www.soscisurvey.de/demo/%%''. The URL of your questionnaire is put together from SoSciSurvey's URL (''%%https://www.soscisurvey.de%%'') and the project directory (e.g. ''demo''). Between those components is a slash (''/''). There is a slash at the end of the address as well, because the address refers to a directory, not a file: ''%%https://www.soscisurvey.de/demo/%%''.
-Although, if the slash is been left out, the user will be redirected to the directory (you'll see that the browser will suddenly show the slash anyway). This redirection will take a short moment, however. 
  
-===== Parameters of the URL =====+You will find your survey's URL under **Survey Project** -> **Project Settings** -> Tab //General Settings// -> //Project folder//. There you can also change the project's folder -- but only as long as the //survey adminitsration period// has not started yet. If necessary, you can change the survey period at any time (e.g. set the start of the period to tomorrow's date). 
 +   
 +**Note:** If you omit the slash at the end, the participant will still be automatically forwarded to the directory -- you can see that the slash in the address line of the browser is added. This redirection will take a short moment, however.
  
-To set more parameters in the link, you should know about the GET-syntax of the HTTP-protocol. You need to tell SoSciSurvey what you want through the URL. 
  
-There is the parameter ''q'' (//questionnaire//) that can be used to choose a specific questionnaire of a project. Another parameter is ''r'' (//reference//) which "marks" the hyperlink (see below).+===== Parameter in the Questionnaire Link ======
  
-Those parameters consist of the variable's name (e.g. ''q'' or ''r'') and its respective value. In between is a equal sign (''=''). Soif the questionnaire you want has the ID (Name"qn1" and the reference is "banner", the parameters are ''q=qn1'' and ''r=banner''. Several parameters are concatenated by using a ''&''-sign: ''q=qn1&r=banner''.+In the link you can send SoSci Survey further instructions and information. For example, which questionnaire should be opened (if there are several questionnaires in the project) or that the dataset has a marker/reference (e.g. the subgroup that the participant belongs to). 
 + 
 + 
 +==== Parameters ===== 
 + 
 +The instruction/information (parameters) always have the same structure: There is a key that specifies which parameter it is, and a value that is to be transmitted for this parameter. Parameters or keys are available: 
 + 
 +  * [[#selection_of_a_questionnaire_q|Selection of a Questionnaire (q)]] (if several questionnaires were created in the project) 
 +  * [[#marking_a_url_r|Marking a URL (r)]] (Variable REF) 
 +  * [[#delivering_a_serial_s|Delivering a serial (s)]] (variable SERIAL) 
 +  * [[#specify_a_language_l|Specify a language (l)]] (for multilingual survey projects) 
 +  * [[#password_password|Password (password)]] (for a password-protected questionnaire 
 +  * [[#interview_token_i|Interview Token (i)]] (to continue an interrupted interview) 
 +  * [[#participation_code_serial_mail_d|Participation code serial mail (d)]] (will be generated automatically by serial_mails) 
 +  * You can also submit [[#user_defined_variables|User defined variables]]. 
 + 
 + 
 +==== Using Parameters in the Link ===== 
 + 
 +To set parameters in the link, you need to learn a little about the GET syntax of the HTTP protocol: 
 + 
 +  * Between key and value there is an equal sign (''=''')\\ ''q=questionnaire2'' 
 +  * Several parameters are separated by an ampersand (''&'')\\ ''q=questionnaire2&r=g1'' 
 +  * Between the survey URL (see above) and the parameter there is a question mark (''?'')\\ ''%%https://www.soscisurvey.de/demo/?q=questionnaire2&r=g1%%''
 + 
 + 
 +==== Notes ==== 
 + 
 +**Warning:** When you insert a link in Outlook or Worda distinction is made between the text that is displayed and where the link actually points (for testing: [[https://duckduckgo.com/?q=hyperlink|www.soscisurvey.de]]). If you change something in the linkthen you may only change the text, but not the link behind it! 
 + 
 +**Note:** To use the parameters documented below, __no__ adjustments are required in SoSci Survey or in the //Project Settings//. Just copy the [[#the_survey_s_url|the survey's URL]] (e.g. ''%%https://www.soscisurvey.de/example/%%''), write the parameters (e.g. ''%%?r=Berlin%%%'') behind it and insert the link (''%%https://www.soscisurvey.de/example/?r=Berlin%%'') in an email or as link on a website. 
 + 
 +**Note:** Please read [[#using_parameters_in_the_link|above]] what the question mark (''?'') and the ampersand (''&'') are all about and how they are used in the link. 
 + 
 +**Note:** The keys for the parameters can be adjusted under **Survey Project** -> **Project Settings** -> Tab //Expert Settings// -> //Variables in the Questionnaire's URL//. Normally this is __not__ necessary and we generally advise against changing the keys. 
 + 
 + 
 +===== Example ===== 
 + 
 +In a survey project 3 target groups are addressed. In the survey project two questionnaires "q1" and "q2" are created. The target groups "A" and "B" should receive the questionnaire "q1" and target group "C" the questionnaire "q2". The data record should then show to which target group each row of data belongs. 
 + 
 +Target group "A" is addressed in a forum. The following link will be placed there: 
 + 
 +    https://www.soscisurvey.de/demo/?r=A&q=q1 
 +   
 +Target group "B" is recruited via a banner. The banner calls the following link: 
 + 
 +    https://www.soscisurvey.de/demo/?r=B&q=q1 
 +     
 +Target group "C" is invited by email. The following link will be sent via the company's email distribution list: 
 + 
 +    https://www.soscisurvey.de/demo/?r=C&q=q2 
 +     
 +If the questionnaire is called up via the first link, the value "A" is stored in the data record in variable "REF" - correspondingly "B" and "C" are stored for the other two links. 
 + 
 +**Important:** Please read the [[#notes|notes]] (above).
  
-Those parameters are attached to the original URL, using a question mark (''?''). The whole URL looks like this: ''%%https://www.soscisurvey.de/demo/?q=qn1&r=banner%%''. 
  
-If the browser calls this address, the website %%https://www.soscisurvey.de/demo/%% is requested and the two parameters are sent. As SoSciSurvey knows what to do with those parameters, it will use ''q'' to select a questionnaire and saves the value for ''r'' into the database. 
  
 ===== Selection of a questionnaire (q) ===== ===== Selection of a questionnaire (q) =====
en/survey/url.txt · Last modified: 23.04.2024 10:29 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki