I have a survey which I would like to get the value of a cookie and display on the Survey. | XM Community
Skip to main content

I have a cookie with the title of the page where the custom htlm intercept is. When user click on the button (intercept) it opens the Survey. At the top of the Survey our customers want to see the title of the page. This cannot be hard code because the same survey will be used in so many different pages.
We want to display the title of the page. Is that possible? I have tried to use JavaScript to get the value using document.getElementsById and didn't work. I also tried use javascript to getcookie() value.
I have also created an embedded data inside the intercept, which I can get the cookie value, but that value cannot be used inside the Survey as well.
Any thoughts?

PauloAugusto
Are you using any tag managers so as to get the value from it and place it in survey. If yes you can use GTM or Adobe analytics direct integration to call those values.
If no you will have to find a property path of that cookie placed and call it via JS


I am not using Tag manager. I don't know how to use that?
"you will have to find a property path of that cookie placed and call it via JS" I have tried using JS inside the question to getCookie() and didn't work.



PauloAugusto
You will not include it in your survey you will include it as embedded data within your Intercept configuration. You can use either of the two for configuration. Create the same embedded data in your survey and pipe it where desired.
image.pngLearn more (https://www.qualtrics.com/support/website-app-feedback/intercepts-tab/edit-intercept-section/action-set-options/embedded-data-website-app-feedback/#EmbeddedDataValueTypes)
Hope it helps!


I have created the embedded data within my intercept. When I go to my survey and try to create the same embedded data I don't see the option of the embedded data I created in my intercept. I also don't see an option to get data from a cookie. Could you please be more specific?
qualtricsimage.JPGAlso, I am not sure where did you get the image you have provided?
qualtricsimage1.JPGThe link you provided shows how to create embedded data within an intercept under actions and the settings are different. see below
qualtricsimage2.JPG


PauloAugusto
You would not get that option in value as such you can keep it empty. It will auto-fill. The name field you add here create the same as embedded data in survey flow.
image.pngHope it helps!


Deepak Thank you very much for your promptly answer. Please see my updated previous question as I was updating it and you answered right the way.


PauloAugusto
Try clicking on the dropdown of Static Value. You will get the required options. The images are different as there are 2 ways to create the intercept either piece by piece or guided. The image I shared is of guided and on the support it is of piece by piece. Both of them function the same.
Hope it helps!


qualtricsimage3.JPGThis is what I get when I click on Static Value.
But if I choose value from cookie, I get this:
qualtricsimage4.JPG


Tank you Deepak
To get the value I had to create an embedded data with the same name under survey flow and move it to the top of the flow. Now I can see the value of the cookie.

  1. First as you said I created the Embedded Data within the Intercept.

  2. Created the Embedded data within the Survey Flow

  3. I pipped the value inside the question I wanted

  4. I can see the value

Thank you very much. You are awesome!!!!


PauloAugusto
If the cookie name is Page_Title your configuration is correct. Just check if you are receiving it within data analysis of survey.


Leave a Reply