springernature / frontend-toolkits

Frontend Component Toolkits for the Elements Design System
MIT License
13 stars 3 forks source link

Add user journeys and additional info to survey link #892

Closed RSeidelsohn closed 1 year ago

RSeidelsohn commented 1 year ago

In OASIS, we use Survey Monkey to send our customers to an additional survey where they can tell us why they chose the rating they selected. In these surveys, we additionally want to see the userJourney and the additionalInfo parameters we add to the customer satisfaction Handlebars template.

For that reason, I enhanced the javascript of the global customer satisfaction tool so that it checks for either parameter's existence and if they are not empty, appends them to the searchParams of the generated survey URL.

Additionally, I made the existing Jest test for that component a bit more flexible and added tests for the two new parameters. Also, I added documentation for these additions to the README, where I removed a duplicated section that was there before.