Custom Survey message for LINK EXPIRATION | XM Community
Skip to main content

Hi Community,

We’re stumble upon a weird behavior on Qualtrics and needing your view on this

  • We are sending personal survey link that expired in 1 day to customer. 
  • Base language is Vietnamese
  • The Inactive survey message (Show a message to people who visit your survey after it expires or after you’ve made it inactive.) is customized in Vietnamese, English (US), English (UK)

When testing, the message only show the default one: “Your survey session has expired and you cannot continue taking the survey.” No matter if the Base Language is Vietnamese or English….

Upon further testing, I’ve found out that the above ‘Inactive survey message’ is only work with the Survey Project expire or inactive. The Link expiration date in Distribution tab will trigger the default one.

Is there anyway to customize this? This is urgent. We’ll appreciate any idea 🙏🙏🙏

@TomG ​@vgayraud ​@chackbusch Sorry for tagging, but I think you guys can help me with this


@Nam Nguyen,

I assume you’ve contact Qualtrics Support, and I’m guessing there is no way to change that message.

Instead of using a link expiration date, what if you add expiration date as a embedded data field to the contact records. In the survey flow, check the expiration date and screen-out with your custom message if it past expiration.


Tom’s method would work well. You can also try adding the below script to the survey’s Header to customize the link expiration error text based on language. It gets the language code and then searches the EndOfSurvey element for specific text, replacing it with other text if it found.

<script>

if (document.documentElement.lang === "EN") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Your survey session has expired and you cannot continue taking the survey./gi, "English Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

if (document.documentElement.lang === "VI") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Phiên khảo sát của bạn đã hết hạn và bạn không thể tiếp tục thực hiện khảo sát./gi, "Vietnamese Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

</script>

 


Tom’s method would work well. You can also try adding the below script to the survey’s Header to customize the link expiration error text based on language. It gets the language code and then searches the EndOfSurvey element for specific text, replacing it with other text if it found.

<script>

if (document.documentElement.lang === "EN") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Your survey session has expired and you cannot continue taking the survey./gi, "English Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

if (document.documentElement.lang === "VI") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Phiên khảo sát của bạn đã hết hạn và bạn không thể tiếp tục thực hiện khảo sát./gi, "Vietnamese Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

</script>

 

@Tom_1842 Thank you, this is perfect👍
I did inspect the message but give up right away thinking no way of changing it without messing up other EoS. I guess I need to get a proper JS skill upgrade. That replace function did solve everything.

 


@Nam Nguyen,

I assume you’ve contact Qualtrics Support, and I’m guessing there is no way to change that message.

Instead of using a link expiration date, what if you add expiration date as a embedded data field to the contact records. In the survey flow, check the expiration date and screen-out with your custom message if it past expiration.

@TomG Thank you for your suggestion. I jump right into Community because I knew Qualtrics Support wouldn’t help with customization and I knew that in here I can find you guys, the best one 💪


Tom’s method would work well. You can also try adding the below script to the survey’s Header to customize the link expiration error text based on language. It gets the language code and then searches the EndOfSurvey element for specific text, replacing it with other text if it found.

<script>

if (document.documentElement.lang === "EN") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Your survey session has expired and you cannot continue taking the survey./gi, "English Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

if (document.documentElement.lang === "VI") {
var text = document.getElementById("EndOfSurvey").innerHTML;
var result = text.replace(/Phiên khảo sát của bạn đã hết hạn và bạn không thể tiếp tục thực hiện khảo sát./gi, "Vietnamese Placeholder Error Text");
document.getElementById("EndOfSurvey").innerHTML = result;
}

</script>

 

Hi Tom,

I used your method and it worked. However, I have branch logic to show different End of Survey message based on reponsdent’s answer and it also got replaced by the message in this code! 

Is there a way to apply this message to Link expiration only and keep my other End of Survey message setting?


@Tom_1842 can you take another look at this please?


@DukeNukem Hmm I am unable to reproduce on my end. The End of Survey message should be the same except the specific string of text gets replaced. Still, the below might be cleaner in that it first checks for the existence of the specific string of text before attempting a replacement:

<script>
if (document.documentElement.lang === "EN") {
var element = document.getElementById("EndOfSurvey");
if (element && element.innerHTML.includes("Your survey session has expired and you cannot continue taking the survey.")) {
element.innerHTML = element.innerHTML.replace(/Your survey session has expired and you cannot continue taking the survey./gi, "English Placeholder Error Text");
}
}

if (document.documentElement.lang === "VI") {
var element = document.getElementById("EndOfSurvey");
if (element && element.innerHTML.includes("Phiên khảo sát của bạn đã hết hạn và bạn không thể tiếp tục thực hiện khảo sát.")) {
element.innerHTML = element.innerHTML.replace(/Phiên khảo sát của bạn đã hết hạn và bạn không thể tiếp tục thực hiện khảo sát./gi, "Vietnamese Placeholder Error Text");
}
}
</script>

 


Leave a Reply