Analytics · Advanced Topics · Tracking helpers

Retrieve your Onesecondbefore user_id

In order to debug and test the Onesecondbefore tracking, you need to know you user_id in order to filter the hits out of the database. An easy way to retrieve it, is to run the following code in the JavaScript Console of your browser. It will log the user_id in the JavaScript Console

osb('uid', function(uid){console.log('Your Onesecondbefore User ID = ' + uid)});}

Use a bookmarklet to retrieve the user_id

If you have several different websites on which you want to retrieve your Onesecondbefore user_id. An easy way to retrieve it, is to Add a bookmark to your favorite browser and add the following piece of code in the URL field:

javascript:if (typeof(osb)==='undefined'){alert('Onesecondbefore is not installed on this website!')} else {osb('uid', function(uid){prompt('Your Onesecondbefore User ID is:', uid)});}