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 the "why" questions.
Goal
By implementing Google Analytics integration, you can:- Find valuable users in GA(Google Analytics)
- 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?
-
method would be different if you are usingGoogle AnalyticsviaintegrationGooglewithoutTagGTM -
Manager. You need to go for the related instruction in the following.If you are usingGoogle AnalyticsTracking Code without GTM1. First of all, make sure you have Google Universal Analytics.Update your Google Analytics Tracking Codeto 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(Make sure to change dimension1 if you already used this dimension before in GA.)3. Create a Custom Dimension in Google Analytics. Make sure theScopeof dimension is "User". Choose a name like "MouseStats Visitor Id".4. After a while, you can find "MouseStats Visitor Id" in "Second Dimension" of any report in GA.5. Copy the "MouseStats Visitor Id", and find Playbacksintegration usingVisitor Idin filters in MouseStats.
Enabling with Google Tag Manager(GTM) Only
<script type='text/javascript'> window.onMouseStatsPlaybackStartRecording = function () { dataLayer.push({ 'event': 'MousestatsPlayback', 'Mousestats Visitor ID': MouseStatsVisitorPlaybacks.visitorId() }); } </script> //MouseStats tracking script here
2. Create a Data Layer Macro for 'Mousestats Visitor ID'.
3. Create a GA Event Tag that fires when event equals 'MousestatsPlayback'. This event can have any category, action and label that the user wants, but this tag will be where you set your User Level custom dimension. So:
a) Go to GA (Google Analytics)
b) Create a new dimension (for example slot 1), name it 'Mousestats Visitor ID' and set the scope to User.
Then, in this event tag, add the custom dimension with the index you’ve chosen (1) and the macro you created earlier as the value: