User identification
Passing User attributes to Usersnap can significantly enhance your ability to target specific user groups, provide personalized experiences and segment feedback received from users. Though it's optional, we strongly recommend it to get the best out of Usersnap.
User authentication
You authenticate users in Usersnap, you can use the following parameters:
email
: This is the most popular form of authentication, that will tie received feedback with particular user. If you use email field in your widget, this will pre-fill it.userId
: If a userId is passed, the user counts as "logged in user" for targeting purposes.
The ID is not stored.
User attributes
Pass extra information about your users, to easily show widget to selected groups and get extra insights while segmenting feedback.
To specify/target a segment you can use predefined ones, such as the followings:
plan
,role
,company
,MRR
,signupDate
,isTrial
However, also your custom attributes can be used such as mySegment
: 'vip'
<script>
window.onUsersnapLoad = function(api) {
api.init({
email: '[email protected]',
userId: '123456',
plan: 'Enterprise',
role: 'CEO',
company: 'Tesla',
MRR: '9999',
signupDate: '2024-03-21',
isTrial: 'yes',
mySegment: 'vip'
})
window.Usersnap = api;
}
var script = document.createElement('script');
script.defer = 1;
script.src = 'https://widget.usersnap.com/global/load/<GLOBAL_API_KEY>?onload=onUsersnapLoad';
document.getElementsByTagName('head')[0].appendChild(script);
</script>
Updated 18 days ago