Configuration Parameters

This document provides a reference to the complete list of configuration parameters available in the Google Analytics SDK v4 for Android.

Overview

In the Google Analytics SDK v4 for Android, you can configure global parameters and tracker specific parameters defined in an XML configuration file. The table below lists all available parameters you can use.

Parameters

ParameterTypePurpose
ga_anonymizeIp boolean If true, tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting. The default is false.
ga_appName string The name of your application, used in the app name dimension in your reports. You can find the default value in the package.
ga_appVersion string The version of your application, used in the app version dimension within your reports. Defaults to the version found in the package.
ga_autoActivityTracking boolean If true, views (Activities) will be tracked automatically. The default is false.
ga_dispatchPeriod integer Frequency of automatic dispatch in seconds. The default is 30 minutes (1,800 seconds).
ga_dryRun boolean If true, enable dry run mode. In dry run mode, the normal code paths are executed locally, but hits are not sent to Google Analytics servers. This is useful for debugging calls to the Google Analytics SDK without polluting recorded data. The default is false.
ga_reportUncaughtExceptions boolean If true, Google Analytics automatically records an Exception each time an uncaught exception is thrown in your application. The default is false.
ga_sampleFrequency string The sample rate to use, which can be any value between 0.0 and 100.0. The default is 100.0
ga_sessionTimeout integer The time (in seconds) your application can stay in the background before the session is ended. Setting this to a negative number will result in a new session never being started by the SDK. However, session timeout can still be managed in the Google Analytics admin interface; see Session and campaign timeout handling for details. The default is 30 seconds.
ga_trackingId string The Google Analytics tracking ID to which to send your data. Dashes in the ID must be unencoded. You can disable your tracking by not providing this value.