Custom URL for referral | XM Community
Skip to main content
I want to generate a custom URL at the end of my survey that the participant can refer to their friends. The URL will link to the same survey, but it will contain a marker to indicate which participant referred it. For instance, if participant A finishes the survey, they should receive a link that looks like survey/link/A that they can pass on to friends and that will have a marker to indicate that participant A was the forwarder. How do I do this?
Add an embedded data field, lets call it r for referer, to the beginning of you survey flow. Then add it as a parameter at the end of your anonymous survey link in your end of survey message, something like:

```

anonsurveylink?r=${e://Field/participant}

```
Good Question :)

1.) I have done this by creating two Embedded variables at start a) Rno = assign randon number using "${rand://int/1:10000}" b) Referal : keep it blank.

2.) At the end of survey just show survey link (which they can copy and share with friends )appended with referal code like "surveylink?Referal=${e://Field/Rno}"
Thanks! And just to be clear, when the new survey link is clicked, the referer ID will be saved in the new survey response?
yes it will be saved in the corresponding variable.
Hi @istewart



Please use some other embedded data name since "referer" is the inbuilt embedded data field.

So, let say you are using embedded data name as "refererID".



I believe once the "Participant A" forward the link to "Participant X" then you would like to authenticate the "refererID" for "Participant X" since, there is a chance that "Participant X" can change the "refererID" in the URL and try to participant in the survey and then you would not be able to know who has referred "Participant X". So, to take care of this scenario you should use "Contact list trigger" and "Authenticator".



Below are the steps to achieve this use case:



Step 1: Add the embedded data field "refererID"



Step 2: At the end of the survey you can print the URL which you want to forward to the next participant. let say the URL is "anonsurveylink?refererID=${e://Field/ResponseID}" (here the refererID will get appended with the "Participant A" unique response ID.



Step 3: Perform contact list trigger and add "ReferenceID" as embedded data in the contact list and the value for the "ReferenceID" would be inbuilt embedded data "ResponseID" i.e. ${e://Field/ResponseID}.

here is the document for contact list trigger:

https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/contact-list-triggers/



Step 4: Just below the embedded data "refererID" add a branch logic to check if "refererID" is not empty then Authenticate



Step 5: Inside the Branch logic add Authenticator and you will have to authenticate the user based on the "embedded data field" from contact list which we created in Step 3. So, Pre-fill the embedded data field "ReferenceID" with "refererID".

https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/authenticator/authenticator-overview/

and in Authenticator option "Maximum Authentication Attempts" assign value as 1.



Step 6: Within Authenticator have your all blocks and at end of the last block have "end of survey element" so, if the user is authenticated then they will be able to participate in the survey else not.



Hope this helps!

Leave a Reply