Gainsight PX AWS S3 Integration
This article explains how to integrate AWS S3 with Gainsight PX to export usage data.
Overview
When you configure a connection to your S3 bucket, Gainsight PX periodically exports user, account, and event data rollups to the S3 bucket in the format (JSON, XML or CSV) you choose. For more information about S3, refer to the Amazon S3 site.
Following are the advantages of integrating Gainsight PX with S3:
- Store usage data for further processing by other services such as security logs and for future reference
- Integrate with data warehouse platforms
- Run machine-learning algorithms
Prerequisites
Ensure the following are configured to integrate PX with S3:
- AWS S3 bucket with valid credentials and write permission to the bucket.
- Time zone as per your location.PX exports data to your S3 bucket once per day for the previous day. The job starts at 3 AM according to your subscription's timezone. The data will be available in a timeframe anywhere between a few minutes to a few hours, depending on the size of the files. For example, to create daily rollups for user events, PX sums up all events for the day based on your time zone. To set your Time Zone, navigate to Administration > Company Details > Time Zone.
Integrate S3 Export
To establish connection between Gainsight PX and S3 bucket:
- Navigate to Administration > Integrations.
- Click the Settings icon or Authorize button on the Amazon S3 Export widget in the Data Integrations section. The AWS S3 Settings dialog appears.
-
Select the Properties option and enter the following details to access your S3 Bucket:
- S3 Bucket Name: Bucket name and any optional sub-folder(s) separated by slashes. This is the name of the bucket that was created in S3. For Example, to export files to a bucket ABC123 with a folder “export” use ABC123/export.
- AWS Access Key and AWS Security Token credentials of your S3 bucket. Ensure you enter valid credentials to establish an S3 integration.
- Choose data type from the Export Format drop-down list
- CSV
- JSON
- XML
- Choose the Export Version of the file
- 1.0
- 2.0 (Latest)
Note: Gainsight supports two versions of export; 1.0 and 2.0. Version 2.0 is the latest and supports environment variables and is the recommended export method. List of files, fields, and groups differ for both the versions.
- Get the Data Exports feature flag enabled by Support. Click the Select Reports option to view the Data Export Reports and PX Generated Reports sections. You can select the files you want to export to the AWS S3 bucket.
Important: The data export reports will not have reports generated from the query builder.
- Click the Summary option to view the summary of reports exported to the selected destination source.
- Click Apply.
- If the credentials of your S3 bucket are valid, the status of integration changes to Authorized. Also, the Synchronize button is displayed. PX exports the data every day based on your time zone and includes data for the previous day. For more information on how to configure your time zone, refer to the Prerequisites section.
- Click on the Synchronize button to understand the schedule for next sync.
- Click the Disable Integration icon to disable PX integration with S3.
Integrate S3 Export with Google Cloud Storage
Gainsight PX allows you to configure the S3 exporter to point to a Google Cloud Storage bucket using a GCP/S3 interoperability layer.
Prerequisites: Ensure that you have access to your Google Cloud Storage Bucket and have generated the Google HMAC keys. For more information on HMAC Keys and how to generate them, refer to the HMAC keys and Create HMAC keys articles respectively.
To configure Google Cloud Storage bucket, follow all the steps listed in the Integrate S3 Export section, with the exception of the following:
- In the S3 Bucket Name field, prefix the bucket name with gs: This indicates to PX that the bucket is a Google Storage bucket, and not an S3 bucket.
- In the AWS Access Key field, enter the Access ID HMAC key value obtained from the Google Cloud Console.
- In the AWS Security Token field, enter the Secret HMAC key value obtained from the Google Cloud Console.
Export Files Definition 2.0
The list of fields and New Group by options available in Version 2.0 are as follows:
Filename | New Fields | Additions to Rollup GroupBy |
---|---|---|
GainsightPX_Account_Custom_Event_Rollups | productKey, environment | productKey, environment |
GainsightPX_Account_Email_Engagement_Rollups | productKey, environment | productKey, environment |
GainsightPX_Account_Event_Rollups | productKey, environment | productKey, environment |
GainsightPX_Account_Feature_Match_Rollups | productKey, environment | productKey, environment |
GainsightPX_Account_InApp_Event_Rollups | productKey, environment | productKey, environment |
GainsightPX_Feedback_Responses | environment | environment |
GainsightPX_Survey_Responses | environment, contactMeAllowed | environment |
GainsightPX_User_Custom_Event_Rollups | environment | environment |
GainsightPX_User_Engagement_Rollups | environment | environment |
GainsightPX_User_Event_Rollups | environment | environment |
GainsightPX_User_Feature_Rollups | environment | environment |
Export Files Definition 1.0
Below are definitions of the output files, including field names and types. Once you receive the data from S3 bucket, use the information below to help you write and process the data. The files are compressed using gzip.
Filename Structure:
The filenames are of the form:
GainsightPX_{ExtractType}_{ISODateTime}.{json|csv|xml}.gz
Below tables give an overview about each export at its summary level.
Export Type: Account Exports
Export | Summary |
---|---|
Accounts | Account attributes |
Account_Custom_Event_Rollups | Daily counts of custom events, grouped by day, account, event |
Account_Email_Engagement_Rollups | Daily counts of email engagements, grouped by day, account, engagement, eventType |
Account_Event_Rollups | Daily counts of FORM_SUBMIT, PAGE_VIEW, SEGMENT, SESSION_INITIALIZED events grouped by day, account, eventType |
Account_Feature_Match_Rollups | Daily counts of feature matches, grouped by day, account, feature |
Account_InApp_Event_Rollups | Daily counts of In-App engagements, grouped by day, account, engagement, eventType |
Export Type: User Exports
Export | Summary |
---|---|
User_Custom_Event_Rollups | Daily counts of custom events grouped by day,user,productKey, account, event |
User_Engagement_Rollups | Daily counts of In-App engagements grouped by day, user, propertyKey, account, engagement, eventType |
User_Event_Rollups | Daily counts of FORM_SUBMIT, PAGE_VIEW, SEGMENT, SESSION_INITIALIZED events grouped by day, user, productKey, account, eventType |
User_Feature_Rollups | Daily counts of feature matches grouped by day, user, propertyKey, account, feature |
Users | User attributes |
Export Type: Survey/Feedback Exports
Export | Summary |
---|---|
Survey_Responses | Surveys Response events |
Feedback_Responses | Feedback events |
Export Type: Metadata Exports
Export | Summary |
---|---|
Engagements | Engagement attributes |
Features | Feature attributes |
Export File Column Definitions
Accounts
Name: GainsightPX_Accounts
Content: Account attributes
Field Name | Field Type |
---|---|
id | String |
name | String |
lastModifiedDate | String |
createDate | String |
plan | String |
numberOfEmployees | Long |
isDeleted | Boolean |
naicsCode | String |
trackedSubscriptionId | String |
sfdcId | String |
lastSeenDate | String |
industry | String |
dunsNumber | String |
sicCode | String |
website | String |
totalUsers | Long |
dailyActiveUsers | Long |
monthlyActiveUsers | Long |
location_* | Location (See Below) |
customAttribute_{customAttributeApiName} | type varies |
Account Events
Name: GainsightPX_Account_Event_Rollups
Content: Account Event Rollup attributes
Field Name | Field Type |
---|---|
date | String |
accountId | String |
type | String |
count | Long |
Account Custom Events
Name: GainsightPX_Account_Custom_Event_Rollups
Content: Account Custom Event Rollup attributes
Field Name | Field Type |
---|---|
date | String |
accountId | String |
eventName | String |
count | Long |
Account Feature Matches
Name: GainsightPX_Account_Feature_Match_Rollups
Content: Account Feature Match Rollup attributes
Field Name | Field Type |
---|---|
date | String |
accountId | String |
featureId | String |
count | Long |
featureName | String |
featurePath | String |
Account InApp Events (Engagements)
Name: GainsightPX_Account_InApp_Event_Rollups
Content: Account InApp Event Rollup attributes
Field Name | Field Type |
---|---|
date | String |
accountId | String |
engagementId | String |
engagementName | String |
type | String |
count | Long |
Account Email Engagements
Name: GainsightPX_Account_Email_Engagement_Rollups
Content: Account Email Engagement Rollup attributes
Field Name | Field Type |
---|---|
date | String |
accountId | String |
engagementId | String |
engagementName | String |
type | String |
count | Long |
Account Hourly Concurrent Sessions
Name: Account_Hourly_Concurrent_Sessions_Rollups
Content: Account Hourly Concurrent Sessions Rollup attributes
Field Name | Field Type |
---|---|
date | String |
hour | String |
accountId | String |
productKey | String |
environment | String |
count | Long |
Users
Name: GainsightPX_Users
Content: User attributes
Field Name | Field Type | Description |
---|---|---|
aptrinsicId | String | |
String | ||
identifyId | String | |
accountId | String | |
firstName | String | |
lastName | String | |
lastInferredDataSyncDate | String | |
webAppVisits | Long | |
globalUnsubscribe | Boolean | |
signUpDate | String | The date/time during the first identify call for a user. Note: If not set explicitly by the identify call, this value defaults to the date/time during the identify call. |
leadId | String | |
leadDate | String | |
createDate | String | The date when the user record was first created, either by the identify call or using the REST API. |
trackedUserRole | String | |
type | String | |
lastModifiedDate | String | The date when the user attribute was last modified. |
numberOfVisits | Long | |
gender | String | |
isDeleted | Boolean | |
lastSeenDate | String | |
score | Long | |
phone | String | |
firstVisitDate | String | This is an optional user attribute. This can be passed as part of the identify data. |
title | String | |
sfdcContactId | String | |
location_* | Location | Refer to Location |
lastInferredOrganization_name | String | |
lastInferredOrganization_numberOfEmployees | String | |
lastInferredOrganization_revenue | String | |
lastInferredOrganization_industry | String | |
lastInferredOrganization_sicCode | String | |
lastInferredOrganization_duns | String | |
lastInferredOrganization_naicsCode | String | |
lastInferredOrganization_webDomain | String | |
lastInferredOrganization_orbNum | String | |
lastInferredOrganization_parentOrbNum | String | |
lastInferredOrganization_location_* | Location | Refer to Location |
lastInferredLocation_* | Location | Refer to Location |
lastUserAgentData_rawUserAgent | String | |
lastUserAgentData_device | String | |
lastUserAgentData_platformType | String | |
astUserAgentData_platformVersion | String | |
lastUserAgentData_browserType | String | |
lastUserAgentData_browserVersion | String | |
customAttribute_{customAttributeApiName} | type varies | |
subscriptionId | String |
Location
Name: Location
Content: Location fields
Field Name | Field Type |
---|---|
countryCode | String |
countryName | String |
stateCode | String |
stateName | String |
cityName | String |
continentCode | String |
postalCode | String |
regionName | String |
timeZone | String |
street | String |
User Events
Name: GainsightPX_User_Event_Rollups
Content: User Event Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
accountId | productKey |
productKey | String |
type | String |
count | Long |
User Custom Events
Name: GainsightPX_User_Custom_Event_Rollups
Content: User Custom Event Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
eventName | String |
count | Long |
User Feature Matches
Name: GainsightPX_User_Feature_Rollups
Content: User Feature Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
accountId | String |
productKey | String |
featureId | String |
count | Long |
featureName | String |
featurePath | String |
User Engagements
Name: GainsightPX_User_Engagement_Rollups
Content: User Engagement Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
engagementId | String |
engagementName | String |
type | String |
count | Long |
User Email Engagements
Name: GainsightPX_User_Email_Engagement_Rollups
Content: User Email Engagement Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
accountId | String |
productKey | String |
environment | String |
engagementId | String |
engagementName | String |
type | String Possible values:
|
count | Long |
User Engagement View State
Name: User_Engagement_View_State_Rollups
Content: User Engagement View State Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
environment | String |
engagementId | String |
engagementName | String |
viewState | String (VIEWED or COMPLETED) |
count | Long |
User Engagement Clicks
Name: GainsightPX_User_Engagement_Clicks
Content: Click events within engagements such as when user clicks on a link in a dialog engagement
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
environment | String |
engagementId | String |
engagementName | String |
linkUrl | String |
sequenceNumber | Integer (zero-based step number of guide, if guide engagement) |
User Article Views
Name: User_External_Article_View_Rollups
Content: User_External_Article_View_Rollup attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
accountId | String |
productKey | String |
environment | String |
externalArticleId | String |
articleTitle | String |
articleUrl | String |
provider | String Possible values:
|
count | Long |
Survey Responses
Name: GainsightPX_Survey_Responses
Content: Survey Response attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
engagementId | String |
score | Int |
comment | String |
type | String |
path Note: Path denotes the current page path when the survey is displayed. |
String |
Feedback
Name: GainsightPX_Feedback_Responses
Content: Feedback Response attributes
Field Name | Field Type |
---|---|
date | String |
identifyId | String |
productKey | String |
accountId | String |
subject | String |
category | String |
description | String |
labels | String |
Engagements
Name: GainsightPX_Engagements
Content: Engagement attributes
Field Name | Field Type |
---|---|
id | String |
name | String |
type | String |
Engagements Extended
Name: GainsightPX_Engagement_Extended_Metadata
Content: Engagement attributes
Field Name | Field Type |
---|---|
id | String |
name | String |
type | String |
productGroup | String |
channel | String |
environments | String |
labels | String |
name | String |
groupName | String |
priorityGroupName | String |
priorityRank | Long |
status | String |
ignoreThrottling | String |
lifetimeViews | Long |
audienceURLs | String |
createdDate | String |
lastModifiedDate | String |
lastModifiedBy | String |
Feature
Name: GainsightPX_Features
Content: Feature attributes
Field Name | Field Type |
---|---|
id | String |
name | String |
type | String |
parentFeatureId | String |
propertyKey | String |
status | String |