Identifying your survey respondents in Website pop-up survey


Introduction

For website pop-up surveys, identifying customers is crucial for gathering relevant and personalized feedback. Unlike email surveys where query strings are used, website pop-ups require the insertion of custom parameters in the website's widget code. This guide will explain how to effectively implement this in your Nicereply widget.

Important reminder

❗ When copying the code, ensure to replace ❗ TOKEN ❗ with your unique company token.

How to find your unique token

Create a website survey and go to SETTINGS & APPEARANCE > select WEBSITE CODE in the left menu.



Standard Widget Code

Insert the standard Nicereply widget code into your website's HTML. The widget initiates the functionality required for the pop-up survey.


<!-- Nicereply widget -->

<script>!function(e,c,n,t,i){e.NicereplyWidgetObject=t,e[t]=function(){e[t].c=e[t].c||[],e[t].c.push(arguments)};var r=c.getElementsByTagName(n)[0];if(void 0!==r){var a=c.createElement("script");a.async=!0,a.src=i,r.appendChild(a)}}(window,document,"body","nicereplyWidget","https://widget.nr-cdn.com/init.js");

nicereplyWidget("init", "TOKEN");</script>

<!-- End Nicereply widget -->


Identifying the customer

To identify a customer, use the nicereplyWidget("customer.set", {...}) method. Replace NAME and EMAIL with dynamic variables or specific customer information.


jsxCopy code

<!-- Nicereply widget -->

<script>!function(e,c,n,t,i){e.NicereplyWidgetObject=t,e[t]=function(){e[t].c=e[t].c||[],e[t].c.push(arguments)};var r=c.getElementsByTagName(n)[0];if(void 0!==r){var a=c.createElement("script");a.async=!0,a.src=i,r.appendChild(a)}}(window,document,"body","nicereplyWidget","https://widget.nr-cdn.com/init.js");

nicereplyWidget("init", "TOKEN");

nicereplyWidget("customer.set", {

name: "NAME",

email: "EMAIL",

});

</script>

<!-- End Nicereply widget -->


Identifying Feedback Object

You can also identify specific feedback objects using the nicereplyWidget("feedbackObject.set", {...}) method. This allows for more granular tracking and association of feedback.


Check out more about Feedback Objects here.


jsxCopy code

<!-- Nicereply widget -->

<script>!function(e,c,n,t,i){e.NicereplyWidgetObject=t,e[t]=function(){e[t].c=e[t].c||[],e[t].c.push(arguments)};var r=c.getElementsByTagName(n)[0];if(void 0!==r){var a=c.createElement("script");a.async=!0,a.src=i,r.appendChild(a)}}(window,document,"body","nicereplyWidget","https://widget.nr-cdn.com/init.js");

nicereplyWidget("init", "TOKEN");

nicereplyWidget("feedbackObject.set", {

username: "USERNAME"

});

</script>

<!-- End Nicereply widget -->


Combining Customer and Feedback Object identification

For comprehensive tracking, you can combine both customer and feedback object identification in the same widget code.


jsxCopy code

<!-- Nicereply widget -->

<script>!function(e,c,n,t,i){e.NicereplyWidgetObject=t,e[t]=function(){e[t].c=e[t].c||[],e[t].c.push(arguments)};var r=c.getElementsByTagName(n)[0];if(void 0!==r){var a=c.createElement("script");a.async=!0,a.src=i,r.appendChild(a)}}(window,document,"body","nicereplyWidget","https://widget.nr-cdn.com/init.js");

nicereplyWidget("init", "TOKEN");

nicereplyWidget("customer.set", {

name: "NAME",

email: "EMAIL",

});

nicereplyWidget("feedbackObject.set", {

username: "USERNAME"

});

</script>

<!-- End Nicereply widget -->


Conclusion

By following these instructions, you can ensure precise customer identification in your NiceReply website pop-up surveys. This enhances the relevance and accuracy of the feedback collected, enabling better customer experience insights and service improvements.