Appsee Google Analytics Integration

Google Analytics

Benefits

By integrating Appsee with Google Analytics You will be able to utilize GA's advanced segmentation and reporting capabilities with Appsee's user recordings.

Prerequisites

  1. Enable the Google Analytics integration in your Appsee dashboard. Login to your Appsee account, and open the account management console. Select the "Integrations" tab and enable the Google Analytics integration.

  2. Add a new Google Analytics Custom Dimension:
    In your Google Analytics dashboard, select Admin in the top menu -> Custom Definitions -> Custom Dimensions:

    Add a new Custom Dimension named "Appsee User URL", with a "User" scope:

    After creating the dimension its index will appear. It should be "1" if this is your first Custom Dimension:


Implementation

iOS
Add the following code immediately after initiating Appsee:
NSString *appseeId = [Appsee generate3rdPartyID:@"GoogleAnalytics" persistent:YES];
id tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:[GAIFields customDimensionForIndex:YOUR_CUSTOM_DIMENSION_INDEX]
      value:[NSString stringWithFormat:@"https://dashboard.appsee.com/3rdparty/GoogleAnalytics/%@", appseeId]];
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"Appsee" action:@"Init" label:nil value:nil] build]];

Note

Replace YOUR_CUSTOM_DIMENSION_INDEX with your Custom Dimension index from the Google Analytics dashboard

Android
Add the following code immediately after initiating Appsee:
String appseeId = Appsee.generate3rdPartyId("GoogleAnalytics", true);
String url = "https://dashboard.appsee.com/3rdparty/GoogleAnalytics/" + appseeId;
mTracker.send(new HitBuilders.EventBuilder("Appsee", "Init").setCustomDimension(YOUR_CUSTOM_DIMENSION_INDEX, url).build());

Note

Replace YOUR_CUSTOM_DIMENSION_INDEX with your Custom Dimension index from the Google Analytics dashboard

Including User Sessions in your Google Analytics Reports

You can now use the "Appsee User URL" dimension when creating reports in Google Analytics. For example, you can see users that triggered an event by creating a report in which "Appsee User URL" is the secondary dimension, as seen below:

The "Appsee User URL" column will be included in the report, and you can then copy and paste the link to view the tracked sessions for every user in the Appsee dashboard. You can use this Chrome extension to convert the URLs to clickable links.


If you have questions regarding the Google Analytics integration please contact us.