Set value to embedded data using Javascript on a website intercept | XM Community
Skip to main content

Hello, 

We are currently working on setting up an embedded data value using Javascript for a web intercept. The thing is that we are using an in-site embedded intercept (see first image below), but we can’t find how to code the Javascript function in order to set its result to be the embedded data value (see second image and code below).

 

Qualtrics.SurveyEngine.addOnUnload(function() {Qualtrics.SurveyEngine.setEmbeddedData( 'q_test', "testing" )});

Is it possible to set the embedded data value this way?

Best,

Daniel

@dduarte 

You can use “static value” instead of value from JavaScript for just punching in the details in embedded data.

Embedded Data in Website Feedback (qualtrics.com)

Additionally, value from JavaScript is to bring data from website and not for any custom value.

Hope it helps!


Hi @Deepak!

Thank you for your prompt response!

Got it, so value from Javascript is only for bringing data from the website. What we want to do is get the current date and time so we can categorize the responses per Quarter.

Do you know by any chance what would be a field we could pull from a website to achieve the above? We are no experts on website development unfortunately. 😓

Thanks,

Daniel


You can use static value like this and it should work

Hope it helps!


Leave a Reply