Using Google Analytics to collect and analyze usage data
Before you begin
For an overview on Google Analytics, and to get a tracking ID, see Get started with Analytics.
To set up data collection using your Google Analytics account
After you create your Google Analytics account, perform the following steps to configure your account:
- Click
> Admin > Property > Property Settings and copy the Tracking ID.
- Click
> Admin > View > View Settings and toggle Site search Tracking to ON.
To update your BMC Digital Workplace environment script
Update your environment script before using the script to enable analytics for BMC Digital Workplace. If you have a multitenant environment, see Configuring-multitenancy.
- On the BMC Digital Workplace server, move the tenant-config.jar file from DWP_HOME/tenant-config to a folder with scripts:
- (Linux) DWP_HOME/tenant-config/scripts/linux
- (Windows) DWP_HOME\tenant-config\scripts\win
- (Optional) To run the tenant configuration utility on a server other than the BMC Digital Workplace server, copy the scripts/linux or scripts\win folders from the BMC Digital Workplace server to the server that will run the utility.
- In the \scripts directory, locate the set_env.bat or set_env.sh script.
Using a text editor such as Notepad, edit the set_env.bat or set_env.sh script and enter the following values for the different variables:
Variable
Value
set analytics_provider(Required - lowercase) google
set analytics_name(Required ) Customer/tenant name
set analytics_global_key(Optional) BMC's Google Analytics tracking ID
set analytics_customer_key(Required ) Your Google Analytics tracking ID
myit_server_url(Required ) http://DigitalWorkplaceServer/dwp
saml_authentication(Required for multitenancy) true
- Save and close the set_env.bat or set_env.sh script.
Test the utility by running the following command:
- (Linux) list_tenants.sh
- (Windows) list_tenants.bat
You should see a default tenant with the name 000000000000001.
To enable analytics in BMC Digital Workplace
- Navigate to the tenant-config scripts folder:
- (Linux) DWP_HOME/tenant-config/scripts/linux
- (Windows) DWP_HOME\tenant-config\scripts\win
- Run the script to enable the feature:
- (Linux) enable_analytics.sh
- (Windows) enable_analytics.bat
To disable analytics in BMC Digital Workplace
- Navigate to the tenant-config scripts folder:
- (Linux) DWP_HOME/tenant-config/scripts/linux
- (Windows) DWP_HOME\tenant-config\scripts\win
- Run the script to disable the feature:
- (Linux) disable_analytics.sh
- (Windows) disable_analytics.bat
To verify your Google Analytics data collection
- Use two or more accounts and log in to BMC Digital Workplace.
- Use the search bar to enter various search terms, and go to various screens in the user interface.
- Wait for approximately 30 minutes to allow the analytics data to be populated in your account.
- Log in to your Google Analytics account.
- From the Google Analytics Home page, view the summary of the number of users, log in time, locations, page visit, and devices.