You can configure Google Analytics and FullStory for session logging and analysis using the JSON configuration file. To achieve this, you must configure the GEAIInstallationConfiguration object. In this way, you will get information about user behavior and application performance.
The integration of analytics tools is controlled through a JSON configuration file, offering flexibility when modifying default settings for the following elements:
- Analytics: Configure Google Tag Manager and FullStory integration.
- Feedback: Enable or disable feedback for SAIA responses.
The JSON configuration consists of two main objects: GEAIInstallationConfiguration and GEAIUiCustomization. The structure is as follows:
type GEAIInstallationConfiguration = {
organizationId?: string;
projectId?: string;
gtmId?: string;
fullStoryId?: string; // Added for FullStory integration
uiCustomization?: GEAIUiCustomization;
isFeedbackDisabled: boolean;
defaultPluginId?: string;
}
type GEAIUiCustomization = {
meta?: { /* ... */ };
login?: { /* ... */ };
logout?: { /* ... */ };
styles?: { /* ... */ };
}
The GEAIInstallationConfiguration object is the primary area for configuring application-level settings, including analytics integration, default settings, and feature toggles. They include:
- organizationId: Default organization Id.
- projectId: Default project Id.
- gtmId: Your Google Tag Manager Id for analytics integration.
- fullStoryId: Your FullStory recording session Id for session replay integration.
- uiCustomization: A GEAIUiCustomization object containing UI customization settings. Detailed information on this object can be found in Customizing the Frontend Appearance with a JSON Configuration File.
- isFeedbackDisabled: A boolean that disables the feedback mechanism for responses generated by Globant Enterprise AI. When set to True, users will not be able to provide thumbs-up/thumbs-down feedback or submit comments on the quality or relevance of the AI's answers. By default, feedback is enabled, allowing you to gather valuable data for improving the AI's performance. Disabling feedback might be appropriate in specific scenarios, such as during initial testing phases, in highly sensitive environments, or when you have alternative feedback collection methods in place.
- defaultPluginId: Specifies the Id of a plugin or assistant that should be opened by default when a user first accesses the Globant Enterprise AI Frontend. This allows you to guide users towards specific functionalities or workflows that are most relevant to their roles or tasks. Users can subsequently customize their preferred default plugin through their personal settings. If no defaultPluginId is provided, the Frontend will likely open with a standard or empty state.
To integrate Google Analytics using Google Tag Manager, you need to provide your GTM Id in the gtmId field of the GEAIInstallationConfiguration object.
When the application detects a value for gtmId, it will dynamically inject the Google Tag Manager script into the application <head>. This script will be loaded asynchronously to avoid blocking the main thread.
It is important to keep in mind that the Google Tag Manager script will only be injected if the gtmId property is present in the configuration.
To integrate FullStory session recording, you need to provide your FullStory recording session Id in the fullStoryId field of the GEAIInstallationConfiguration object.
When the application detects a value for fullStoryId, it will dynamically inject the FullStory script into the application <head>. To ensure optimal performance, the script is injected lazily and executed within a web worker using Partytown. This prevents the FullStory script from blocking the main thread and impacting the application's responsiveness.
The FullStory script is injected with the attribute type="text/partytown". This tells Partytown to execute the script within a web worker, offloading the processing from the main thread. This approach ensures that the analytics script does not negatively impact the user experience.
type GEAIInstallationConfiguration = {
"organizationId": "my-organization",
"projectId": "my-project",
"gtmId": "GTM-XXXXXXX",
"fullStoryId": "12345678",
"uiCustomization":GEAIUiCustomization;
"isFeedbackDisabled": false,
"defaultPluginId": "my-default-plugin"
}
type GEAIUiCustomization = {
meta?: { /* ... */ };
login?: { /* ... */ };
logout?: { /* ... */ };
styles?: { /* ... */ };
}
After customizing the JSON configuration file, you need to deploy it to your S3 bucket. Ensure that the INSTALLATION_CONFIG_FILE environment variable points to the correct location of the JSON file in S3.
To deploy the configuration, follow these steps:
- Upload the JSON file to your S3 bucket.
- Set the INSTALLATION_CONFIG_FILE environment variable to the S3 path of your JSON file.