AI-generated Key Takeaways
-
This package provides classes to track analytics data using Google Analytics for Android applications.
-
GoogleAnalytics
is the main entry point for interacting with Google Analytics and managing trackers. -
Tracker
objects are used to compose and send data hits (e.g., screen views, events) to Google Analytics. -
HitBuilders
provide helper methods for constructing various types of hits with relevant parameters. -
Several components utilize Android system services like
JobService
,BroadcastReceiver
, andService
for background processing and data collection.
Interfaces
ExceptionParser | This interface is responsible for parsing a
Throwable and
providing a short, meaningful description to report to Google Analytics. |
Logger | This interface is deprecated. Logger interface
is deprecated. Use adb shell setprop log.tag.GAv4 DEBUG to enable debug
logging for Google Analytics. |
Classes
AnalyticsJobService | A JobService
used by Google Analytics. |
AnalyticsReceiver | A BroadcastReceiver
used by Google Analytics. |
AnalyticsService | A Service used by
Google Analytics. |
CampaignTrackingReceiver | Google Analytics receiver for
com.android.vending.INSTALL_REFERRER . |
CampaignTrackingService | This class is deprecated. Campaign tracking happens in CampaignTrackingReceiver only. |
ExceptionReporter | Used to catch any uncaught exceptions and report them to Google Analytics. |
GoogleAnalytics | The top level Google Analytics singleton that
provides methods for configuring Google Analytics and creating Tracker
objects. |
HitBuilders | Helper class to build a map of hit parameters and values. |
HitBuilders.AppViewBuilder | This class is deprecated. This class has been deprecated in favor of the new ScreenViewBuilder class. The two classes are semantically similar but the latter is consistent across all the Google Analytics platforms. |
HitBuilders.EventBuilder | A Builder object to build event hits. |
HitBuilders.ExceptionBuilder | Exception builder allows you to measure the number and type of caught and uncaught crashes and exceptions that occur in your app. |
HitBuilders.HitBuilder<T extends HitBuilder> | Internal class to provide common builder class methods. |
HitBuilders.ItemBuilder | This class is deprecated. This class has been deprecated in favor of a richer set of APIs on all the HitBuilder classes. With the new approach, simply use addProduct, addImpression, addPromo and setAction to add ecommerce data to any of the hits. |
HitBuilders.ScreenViewBuilder | Class to build a screen view hit. |
HitBuilders.SocialBuilder | A Builder object to build social event hits. |
HitBuilders.TimingBuilder | Hit builder used to collect timing related data. |
HitBuilders.TransactionBuilder | This class is deprecated. This class has been deprecated in favor of a richer set of APIs on all the HitBuilder classes. With the new approach, simply use addProduct, addImpression, addPromo and setAction to add ecommerce data to any of the hits. |
Logger.LogLevel | This class is deprecated. See Logger
interface for details. |
StandardExceptionParser | This class will capture the root cause (last in a
chain of causes) Throwable and
report the exception type, class name, method name and thread name. |
Tracker | Composes and sends hits to Google Analytics. |