Fullstory Integration with Google Analytics Technical Guide - Mobile

Available for the following Plan types:

Fullstory Enterprise*

Fullstory Advanced*

Fullstory Business*

Fullstory Free

*with the following add-on:

Fullstory for Mobile Apps

Available to the following User roles:

Admin

Architect

Standard

 

Overview

Google Analytics (GA) is an analytics service that tracks and reports traffic through your application. (In the Fullstory app settings there is a switch for GA for use on a website, the guide for this can be found here.)

Integrations

Identifying user variables at the same time for both Fullstory and GA

By identifying users at the same time for both GA and Fullstory, it can be easier to narrow down sessions as well as cross reference data between our platforms.

Example: (GA on left & Fullstory on the right)

Screen_Shot_2020-07-31_at_10.59.20_AM.png Screen

 

Use Cases

  1. Ability to identify a user at login: 
    You want to set user variables or identify users with a UUID and their variables with Fullstory and Google Analytics at the same time so that you can search the same user in Fullstory and GA by their UUID or their user variables (eg. a user's email). 
  2. Reset to an anonymous user upon logout: 
    You want to release the identity of the current user in Fullstory and create a new anonymous session, and for GA you want to clear all analytics data for this app from the device and resets the app instance id.

Implementation 

Identifying a user at login

iOS:

// User Logs In...
Analytics.setUserID(user.id.uuidString)
Analytics.setUserProperty(user.email, forName: "user_email")
FS.identify(user.id.uuidString, userVars: user.infoDict)

Android:

// User Logs in
Map<String, String> userVars = new HashMap<>();

userVars.put("displayName", "Ada Lovelace");
userVars.put("email", "ada@example.com");

mFirebaseAnalytics.setUserId(user.id);
FS.identify(user.id, userVars);

Reset a user upon logout

iOS:

// User Logs out...
FS.anonymize()
Analytics.resetAnalyticsData()

Android:

// User Logs out
FS.anonymize();
Analytics.resetAnalyticsData();

 


Was this article helpful?

Got Questions?

Get in touch with a Fullstory rep, ask the community or check out our developer documentation.