Want to know who is sending you feedback without making them fill out a form? You can tell Marker.io to automatically identify logged-in users on your website or app. This guide shows you how to set it up.
Why is this useful?
When you automatically identify reporters, it makes the feedback process better for everyone:
It's easier for your users: They can send feedback without needing to type their name and email.
You get better information: You always know exactly who the report is from.
It keeps things organized: Reports are automatically linked to the right person in your system.
β οΈ Crucial Step: Using Dynamic Placeholders
Before you copy the code below, it is essential to understand that you must replace the placeholder values with dynamic variables from your own system.
Do not use the literal text YOUR_USER_EMAIL_VARIABLE
.
Think of it like a mail merge for an email. You wouldn't type the actual words "Dear Customer Name". Instead, you'd use a placeholder like {{first_name}}
that your email system replaces with a real person's name.
You must do the same here. You need to use the variable from your application that holds the logged-in user's information.
How to Set It Up
Choose the option that best fits how your website works.
Option 1: Identify the user when the page loads
Use this method if you know who the user is as soon as your website page appears. Add the reporter
object to your main Marker.io code snippet and use your system's variables.
<script>
window.markerConfig = {
project: "YOUR_PROJECT_ID",
reporter: {
//Replace these placeholders with your user data variables.
email: YOUR_USER_EMAIL_VARIABLE,
fullName: YOUR_USER_NAME_VARIABLE,
},
};
</script>
Option 2: Identify the user after they log in
Use this method if users log in to your website or app without the page reloading. After they successfully log in, run this command using the variables that contain their information.
<script>
Marker.setReporter({
//Replace these placeholders with your user data variables.
email: user.getEmail(),
fullName: user.getName(),
});
</script>
Remember: You only need to identify a user once per visit. Our widget will remember their details until they start a new session.
Frequently Asked Questions
π€ What if a user's email already exists in Marker.io?
If a reporter's email matches an existing Marker.io account (like a team member or an invited client), our widget will simply ask them to log in. This connects the new report directly to their account, which helps keep everything tidy.
π€ What if I want to collect feedback anonymously instead?
If you'd rather collect feedback without requiring your user's specific name and email, we have another guide for that. You can set up a "shared email" to receive all reports.
Read more here: How to Stop Asking Reporters for Their Name and Email