How do I add additional website data to a feedback result?

To add additional data such as a user id, you need to add the ‘Website data’ element in our feedback form builder and link this field to the JavaScript variable, HTML element, URL parameter, or cookie where your web page data is stored. To apply this, please read the description below:

In the sidebar select the ‘Data collection’ icon and choose ‘Feedback forms’.

Now you are on the feedback forms collections page. If you want to edit an existing form, you can click on the ‘Pencil' button to open it. If you want to create a new form choose 'New form’.

This is the form builder. You can add additional data to the form by adding an element called ‘Website data’. To add this element make sure you are in the ‘Build’ step of the form creation process. Under the ‘Add’ section you can find the ‘Website data’ element. Click on it to add it to the form.

Select the element itself to add the website data that you want to include. You can add multiple data sources to this element. There are five different sources that you can choose from.

  • URL parameters

  • JavaScript variables

  • CSS selectors

  • Cookie names

  • Data attributes


URL parameter

If you want to collect the URL parameter, choose the URL parameter option and use the name of the parameter. Once added this will collect the value of the parameter.

For the above example URL, we would receive the URL parameter DD19 as user_id:

Similarly for user email, campaign name, campaign source and NPS.

JS variable

In case you want to use a JS variable, the variable should be globally accessible, for instance, if user_id is a global variable it will take the value it contains and pass it along as feedback (as a string). The variable can also be an object or array or even a nested object (for instance: test_object.user_id) if the value of the specified variable is an array or object it will be encoded into a JSON string. Basically, as long as the variable's scope is global we'll be able to pick it up.

For example, if you have a data layer, with the following input in your console:

The received website data will contain all elements in the data layer.

CSS selector

For the CSS selector option, you can use a tag, a class, an id, or, an attribute. If you want to use a class make sure to start with a dot, like this: .my-class. If you want to use an id you should use a hash, like this: #my-id. It will add the entire element where the class, id, attribute or tag is available.

For the above, you will receive the page title.

The cookie option works similarly to the previous options. Just use the cookie name and the value will be added to the website data in your feedback results.

The above returns the cookie value of the cookie ‘lang’, which is the language in this case:

Data attribute

The data attribute option catches the data attribute of the closest selected element to the form.

The above, for example, can be used on an FAQ page, whereby people have opened a dropdown for a question, and then fill out the feedback survey. The survey will then get data from the first opened question, which will be received in your feedback inbox.

The results

The additional website data will be added to the feedback as soon as feedback is submitted by your website visitor.

The website data will be available in the feedback results section found under ‘Reporting’ > ‘Feedback inbox’.

You can also use these variables in your chart builder to combine your website data with other feedback elements such as an NPS or Customer Satisfaction score. It is also possible to use the variables to trigger alerts/integrations and/or to create specific inbox filters (and/or add automatic tags).

How to use the results in…


You can add the results to a chart. If we use the example of the URL parameters, we could investigate how often a campaign source is used for each campaign name. This is done by adding the website data - campaign source 4 times to the graph, and filter each on a different source. Then, group the data against the website data - campaign name:

2. The inbox filter

If you would like to see all feedback from a specific campaign source, in the inbox filter you can use the following custom filter:

It is also possible to filter on several campaign sources.

3. Alerts

Furthermore, you could also create alerts every time feedback is given when the campaign source equals a certain value:

Again, you could also specify several campaign sources.

Video walkthrough: