Skip to main content
All CollectionsIntegrations
Google Analytics integration
Google Analytics integration
Simon avatar
Written by Simon
Updated over 10 months ago

Google Analytics 4 integration coming soon

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:

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

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

Did this answer your question?