# Identifying your users
By default, all of your users and customers are anonymous within Feederloop.
You can optionally identify users within Feederloop which provides several benefits:
- Session replays will be linked to users. This gives a more complete profile of user activity and history.
- Agents can search for users based on
display name
oremail
. - Agents will know when users are online or offline.
- Agents will know who they're talking to on calls.
- You can provide any extra information you want to. This provides more context for agents.
# How to identify users
Add the following code snippet to every page where you have the Feederloop widget installed:
window.addEventListener('feederloopLoaded', () => {
Feederloop.identify({
displayName: "Spider Man", // Required
uniqueId: "1234", // Required: must be unique for every user
email: "peterparker@marvel.com", // Optional but highly recommended
})
})
TIP
- The
displayName
anduniqueId
fields are required. - The
uniqueId
must uniquely identify your users. For example a uuid, email address, or ID. - The
email
field is optional but if provided, will aid in searching for users in Feederloop.
You can add any additional data (as key:value
pairs) you wish. For example, here is a more
comprehensive identification call:
window.addEventListener('feederloopLoaded', () => {
Feederloop.identify({
displayName: "Spider Man", // Required
uniqueId: "1234", // Required: must be unique for every user
email: "peterparker@marvel.com", // Optional but highly recommended
spiritAnimal: "spider",
nemesis: "Green Goblin",
girlfriend: "Mary Jane Watson"
})
})
# Updating an existing user's information
You can make additional calls to Feederloop.identify({...})
after the initial call
which will update the user (based on uniqueId
) with the data you provide.