How can I change the look & feel of the survey based on parameter from the link? | XM Community
Skip to main content

I have an email survey which needs to needs to be sent to customers across many countries. Our company operates under different brands in some countries, which means we need to change the brand logo & colours of the button based on the brand name. 

So instead of creating multiple surveys for each country & brand (in that case I’ll end up with 100s of surveys), I want to create just 1 master survey and change the brand logo & button colours based on a parameter I can pass in the survey URL.

Can someone please advise how I can do this? Thanks a lot!

@Dhananjayan Palaniswamy : 

you can achieve your goal of creating a single master survey that adapts based on parameters in the survey URL. Here’s how you can do it:


Create a single survey that contains all the questions and content you want to share across different brands and countries. Keep the design as generic as possible.

You will need to create parameters for brand logos and button colors. These parameters could be something like brandLogo and buttonColor.
 
You will need to use JavaScript to dynamically change the logo and button colors based on the parameters passed in the survey URL. You can use the “JavaScript” question type to embed custom code.
For example, you can use JavaScript to change the logo source and button color based on the parameters like this:

Qualtrics.SurveyEngine.addOnload(function() {
    var brandLogo = "${e://Field/brandLogo}";
    var buttonColor = "${e://Field/buttonColor}";
    
    // Update logo source and button color based on parameters
    jQuery("#brandLogoElement").attr("src", brandLogo);
    jQuery("#buttonElement").css("background-color", buttonColor);
});


When you share the survey, you can include parameters in the URL like this:
https://your-survey-link?brandLogo=brand1logo.png&buttonColor=#FF0000


Do I need to apply this script in each question? Or apply in the global header?

Also, instead of passing many parameters in link, is it possible to set them in the survey based on one parameter (let’s say “country”)?


Leave a Reply