Google Analytics SDK v4 for Android - Parameters

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


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.


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.
ga_appName string The name of your app, used in the app name dimension in your reports. Defaults to the value found 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_logLevel string The verbosity of the SDK logger. Valid values from least to most verbose are: error,warning,info, and verbose. Log level is set to warning by default.
ga_dispatchPeriod integer Frequency of automatic dispatch in seconds. Defaults to 30 minutes (1800 seconds).
ga_sampleFrequency string The sample rate to use. Default is 100.0. It can be any value between 0.0 and 100.0
ga_autoActivityTracking boolean

If true, views (Activities) will be tracked automatically. false by default.

ga_anonymizeIp boolean 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. false by default.
ga_reportUncaughtExceptions boolean Automatically track an Exception each time an uncaught exception is thrown in your application. false by default.
ga_sessionTimeout integer The amount of time (in seconds) your application can stay in the background before the session is ended. Default is 30 seconds. 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 (Help Center) for details.
ga_dryRun boolean If true, enable dry run mode. Default is false. 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.