Using Query Strings to add piped text | XM Community
Skip to main content

Is it possible to use a Query String and piped text to add text to a survey distributed by anonymous link based on the query string?

We have a programs registration form that will be linked to on about 30 different web pages. 

We know how to use query strings as embedded data to track which program folks are registering for.

However, we would like the name of the program they are registering for to appear in the survey text, possibly in the intro block.

For example, if the user clicks on https://www.awesomeprogram.fakedomain, we would like the text “Awesome Program” to appear on the survey.

This would allow us to have a single registration form for all of these programs.

We’re open to some code, if possible.

Thanks.

 

 

You can append anonymous link with query string so link will be like:-

 

anaonymouslink?page=Awesome Program


So on 30 webpages you can have anonymous link appended with corresponding page string and create “Page” as embedded field to see this data with survey responses.


Thanks for the reply. I got how the query string will work with an anonymous link and how we can then track that in the survey data.  Can we pass the “Awesome Program” into the survey itself, through branch logic maybe?


Thanks for the reply. I got how the query string will work with an anonymous link and how we can then track that in the survey data.  Can we pass the “Awesome Program” into the survey itself, through branch logic maybe?

If ‘page’ is your url parameter, then you can pipe ${e://Field/page} and it will display the value of page (e.g., ‘Awesome Program’). You can also use the embedded data field  ‘page’ in survey logic.

By the way, you should url encode the parameter values. For example, page=Awesome+Program or page=Awesome%20Program.


Got it! Thank you. Simpler than I thought I guess, but I did not consider the URL encode bit.


Leave a Reply