Google Analytics

Google Analytics provides behavioral analytics and content performance for websites and mobile apps. Urban Airship Connect provides a real-time stream of user events from your app.

Complement your Google Analytics data with real-time, user-level mobile engagement data from Urban Airship Connect. This integration enables a complete view of the user experience by combining Google Analytics data with user-specific interactions such as push sends, direct app opens, and uninstalls.

This integration uses our ID Matching feature. Once you've implemented the ID Match between a user's Google Analytics CID and the user's Urban Airship Channel ID, Urban Airship Connect can report events directly to Google Analytics about that user. From there, you can create segments within Google Analytics to track mobile engagement behavior.

Setup

Client Code

Fetch the Google CID for your user, then associate it with the Urban Airship channel ID. See ID Matching for details on this feature.

iOS

UAAssociatedIdentifiers *identifiers = [[UAirship shared].analytics currentAssociatedDeviceIdentifiers];

// Add the client ID from your Google Anlaytics tracker:
[identifiers setIdentifier:[tracker get:kGAIClientId] forKey:@"GA_CID"];

// Associate the identifiers
[[UAirship shared].analytics associateDeviceIdentifiers:identifiers];
let identifiers = UAirship.shared().analytics.currentAssociatedDeviceIdentifiers()

// Add the client ID from your Google Anlaytics tracker:
identifiers.setIdentifier(tracker.get(kGAIClientId), forKey:"GA_CID")

// Update the identifiers
UAirship.shared().analytics.associateDeviceIdentifiers(identifiers)

Android

// Get the Google Analytic tracker ID
String clientId = GoogleAnalytics.getInstance(getContext()).getClientId();

// Associate the identifiers
UAirship.shared().getAnalytics()
          .editAssociatedIdentifiers()
          .addIdentifier("GA_CID", clientId)
          .apply();

Dashboard

  1. Open your project from the dashboard, then click Settings and select Connect Integrations.

  2. Under the Connections heading, click Google Analytics
  3. Configure a new Google Analytics integration:
    • Enter a user-friendly name and description.
    • Enter the Google Analytics Tracking ID for your app. If you do not have this, contact your iOS or Android developer.
    • Choose one or more event type:

      • Sends
      • Direct Opens
      • Uninstalls
  4. Click the Save button.

Now that you have configured your app and your Connect integration, you can create event-based Segments in Google Analytics. See Connect-Google Analytics Event Mapping below for details on mapping Connect events to Google Analytics events.

Google Analytics Dashboard

Connect-Google Analytics Event Mapping

Connect EventGA Event CategoryGA Event ActionGA Event Label
SENDUrban AirshipSendThe group ID, if present, or the push ID, if there is no Group ID
OPEN (direct open)Urban AirshipDirect Open from PushThe triggering group ID, if present, or the push ID, if there is no Group ID See Push ID and Group ID
UNINSTALLUrban AirshipUninstallN/A

Event Category View

Event Action View

Event Label View