Skip to main content
Adding context information to ideas and bugs
Anastasiia Serebrianska avatar
Written by Anastasiia Serebrianska
Updated over a week ago

When analyzing customers feedback, it is important to understand in what context user leaves it. UserReport provides operational system, browser and device information on users leaving feedback.

However, in some cases, it might not be enough. You might, furthermore, like to know the following: is user registered or not? if registered, on what plan it is - free or premium? What is his user ID? Is there anything in her or his shopping cart?

The UserReport snippet enables you to add context information to your user feedback.

Here is an example:

var userContext = { "userId": 123, "accountType": "premium" }; // composing context object 
// If separated from main snippet we need to ensure that _urq is defined
window._urq = window._urq || [];
// Set context information
_urq.push(['setFeedbackForumMetadata', userContext]);

If you embed Feedback widget into IFrame or compose a link to it dynamically, you can also send context information, using the metadata parameter. Here is an example:

var userContext = { "userId": 123, "accountType": "premium" }; var staticLink = "https://feedback.userreport.com/ff479801-fc38-48bd-bf2d-a499ae38c02b/"; var feedbackUrl = staticLink + "#metadata=" + encodeURIComponent(JSON.stringify(userCont
Did this answer your question?