You are reviewing MouseStats documentation: Take a look to the product!
< back

Google Analytics integration

Integration of MouseStats and Google Analytics leads to more valuable reports. Google Analytics will provide you brilliant details about visitors. Now, using MouseStats integration you can find out how they are navigating and watch them to answer all "how" questions.


Goal

By implementing Google Analytics integration, you can:
  • First, find valuable users in GA(Google Analytics)
  • Then, copy their MouseStats Playback Visitor ID from GA
  • And, watch their Playbacks in MouseStats.

MouseStats Playback Visitor ID will be defined as Custom Variable/Custom Dimension in GA reports. So, you can go for segmentation and find valuable users in GA and then watch their Playbacks in your MouseStats account.


How?

1. First of all, make sure you have Google Universal Analytics. Update your Google Analytics Tracking Code to Universal Analytics.

2. Add the following code before MouseStats tracking script:

<script type='text/javascript'>
window.onMouseStatsPlaybackStartRecording = function () {
    ga('set', 'dimension1', MouseStatsVisitorPlaybacks.visitorId());
}
</script>
//MouseStats tracking script here

@@alertbox:Make(Make sure to change dimension1 if you already used this dimension before in GA.@@GA.)

3. Create a Custom Dimension in Google Analytics. Make sure the Scope of dimension is "User". Choose a name like "MouseStats Visitor Id".

New Custom Dimension


4. After a day, you can find "MouseStats Visitor Id" in "Second Dimension" of any report in GA.

Reporting


5. Copy the "MouseStats Visitor Id", and find Playbacks using Visitor Id in filters in MouseStats.

Visitor Id