Skip to main content
Gainsight Inc.

Overview of Gainsight PX Mobile SDK

This article introduces the Gainsight PX Mobile SDK and explains the various advantages of using this SDK.

Overview

The Gainsight PX is a powerful application that helps you create in-app engagements to track various events from your mobile application. 

The Gainsight PX mobile SDK can be used by mobile developers to integrate Gainsight PX into their mobile application. This integration allows Gainsight PX to send real-time events from your mobile app. You can easily get insights on critical data like the number of downloads, activities performed by users in your app, screens viewed, and other important information about your app.

Overview Recent Activities.jpg

Gainsight SDK is available in two versions; Android and iOS. You can use the respective SDK to integrate Gainsight PX, into your application. 

Using the SDK

You can download the Gainsight PX SDK from Gainsight’s official site. Once you download the SDK, you can add it to your project and then create dependencies from other modules as required.

For a detailed integration manual for iOS, Android,React Native, Flutter, NativeScript, Xamarin, and Hybrid Mobile SDK refer to the respective articles from the Install Gainsight PX Guide. 

Once you setup Gainsight PX in your mobile app, you can start receiving events about your app.

Initialize Gainsight PX SDK to Different Environments

By default, the SDK points to the US environment. To configure the SDK to point to the EU environment, you need to set the `host` property of Analytics Configurations to `EU`. Below are the codes for respective platforms.

iOS

let configurations = AnalyticsConfigurations(apiKey: <#String#>)
configurations.connection = Connection(connectionMode: ConnectionMode.eu)
GainsightPX.shared.initialise(configurations: configurations, completionBlock: nil)

Android

GainsightPX.Builder builder = new GainsightPX.Builder(webView.getContext(), apiKey);
builder.pxHost(GainsightPX.PXHost.EU);
GainsightPX.setSingletonInstance(builder.build());

React Native

configurations.host = PXHost.eu;

Flutter

configurations.host = PXHost.eu

NativeScript 

configurations.host = "eu"; // other values are: "us", "us2"

Hybrid SDK

Typescript:
    (window as any).gainsightpx?.initialize({apiKey: <#APIKEY#>, host: 'eu'});// other values are: "us", "us2"
Javascript:
    window.gainsightpx.initialize({apiKey: <#APIKEY#>, host: 'eu'})// other values are: "us", "us2"

Xamarin

configuration.Host = PXConnectionHost.Eu;

Advantages of Gainsight PX SDK

  • Allows you to easily receive multiple events from your app.
  • Provides insights on users of your app. 
  • Allows you to easily create custom events and track any part of your app.
  • Was this article helpful?