LiveSession and Sentry integration
What is Sentry?
Sentry is a bug tracking tool that helps you find issues and errors on your website. This way, it’s easier and faster to ship high-quality software. Our integration will help you improve the user experience on the website. Integrating Sentry with LiveSession is a real time-saver, as you can access all information in one place.
How does it work?
As you connect both tools, each new issue in Sentry will get a tag called sessionURL. It will redirect you to the right recording in LiveSession so you can immediately see what caused the error.
Every time a new session will start, our code will send an event to Segment with a link to session replay.
How can I install this integration?
To install integration, add the code below before your</body>
closing tag:<script type="text/javascript">
Sentry.init({
dsn: "YOUR_SENTRY_URL",
beforeSend: function beforeSend(event) {
var createdSessionURL = "";
__ls("getSessionURL", function (url, isNewSession) {
createdSessionURL = url;
});
var wait = function wait(ms) {
return new Promise(function (r, j) {
return setTimeout(r, ms);
});
};
return wait(3000).then(function () {
event.extra["sessionURL"] = createdSessionURL;
return event;
});
}
});
Sentry.configureScope(function (scope) {
scope.setExtra("sessionURL", "");
});
</script>