LiveSession and Google Analytics integration

Kamil Drazkiewicz
Kamil Drazkiewicz3 minMay 11, 2022

What is Google Analytics?

Google Analytics tracks visitors on website. It lets you understand source of traffic on your website, conversion rates, and many more.

How does this integration work?

This integration sends links to session replays from LiveSession to your Google Analytics tracker. As a result, you can open recordings of a specific user directly from Analytics dashboard.

Every time a new session will start, our code will send an event to GA tracker with a link to session replay.

How can I install this integration?

To install integration, add the code below before your </body> closing tag:

if(ga && __ls){
__ls("getSessionURL", function(url, isNew){
        ga('send', {
            hitType: 'event',
            eventCategory: 'LiveSession recording',
            eventAction: url,
            nonInteraction: 1

To make this integration works you need to have Google Analytics and LiveSession installed on your website. If you haven’t installed our tracking code yet check this article.

Now you can go to ‘Audience > User Explorer’ section and open user profile.

ga integration 1

Find event on actions list and expand details. You can also click expand all to make browsing data easier.

Google Analytics intergration

Find ‘LiveSession recording’ event on actions list and copy-paste link to your web browser.

Google Analytics intergration

(Optional) Segment users with LiveSession session replay in Google Analytics

You can define “LiveSession” segment in Google Analytics to search users with our event. It can make browsing session replays in GA easier. It’s possible to add your own conditions to our segment and search for specific user groups.

Firstly, click on “Add segment”.

ga integration 4

Then click on “New segment”.

ga integration 5

Open conditions section.

ga integration 6

Now we’ll filter sessions. Find “Event Category” on list.

ga integration 7

Set exactly matches (1). Type in our “Event Category” name, in code specified above it’s “LiveSession recording” (2). Then, let’s set up name for our new segment - “Users with session replays” (3). Finally, save the segment (4). You can add more conditions to filter some specific user groups.

ga integration 8

Related articles

    Start understanding
    your users today

    Free 14-day trial

    No credit card required

    Easy setup