Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

...

https://demo.mopinion.com/survey/public/take-survey/abcdefghijklmnopqrstuvwxyz1234567890?user_id=DD19&user_email=Dd@test.nl&campaign_name=B&campaign_source=cart-abandonment&language=fr&nps=7

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.

...

In case you want to use a JS variable, the variable should be globally accessible, so 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.

...