Skip to main content

Troubleshoot: Feedback Shows "Someone" or "someone@example.com" Instead of the Real User

How to fix feedback showing a placeholder submitter name instead of the actual logged-in user.

Written by Jon

The Userback install code includes an optional section for identifying logged-in users. It ships with example values, someone and someone@example.com. If that section is left unchanged, every piece of feedback is credited to that example user.

The code looks like this:

<script>   window.Userback = window.Userback || {};   Userback.access_token = 'A-ACCESSCODE';    // identify your logged-in users (optional)   Userback.user_data = {     id: "123456", // example data     info: {       name: "someone", // example data       email: "someone@example.com" // example data     }   };    (function(d) {     var s = d.createElement('script');     s.async = true;     s.src = 'https://static.userback.io/widget/v1.js';     (d.head || d.body).appendChild(s);   })(document); </script>

There are two ways to fix it.

Option 1: Send your real users' details (recommended)

Replace the example values with the details of whoever is logged in, taken from your app. For example:

Userback.user_data = {   id: currentUser.id,   info: {     name: currentUser.name,     email: currentUser.email   } };

You can also identify users after Userback loads, with Userback.identify():

Userback.identify(currentUser.id, {   name: currentUser.name,   email: currentUser.email });

Each piece of feedback is then linked to the right person, and you can build segments from their details. See How to Identify Users.

Option 2: Remove user identification

If you don't want to identify users, delete this part of the code:

// identify your logged-in users (optional) Userback.user_data = {   id: "123456", // example data   info: {     name: "someone", // example data     email: "someone@example.com" // example data   } };

Reporters can then type their own name and email into the widget, if the Name and Email fields are turned on in the widget form.

Related articles

Did this answer your question?