GGLContext(Analytics) Category

GGLContext(Analytics) Category Reference


This category extends GGLContext with the analytics service.

Import GGLContext+Analytics to use Google Analytics in your app.

[GAI sharedInstance] and [[GAI sharedInstance] defaultTracker] should be ready to use after -[[GGLContext sharedInstance] configureWithError:] is called. The defaultTracker can also be fetched here through [GGLContext sharedInstance].tracker. The tracking ID of the tracker is the one defined in GoogleService-Info.plist.

See also


id< GAITracker > tracker
 Retrieve a configured GAITracker instance. More...

Property Documentation

- (id<GAITracker>) tracker

Retrieve a configured GAITracker instance.

Note that [[GAI sharedInstance] defaultTracker] is the first initialized tracker. If a developer initializes a tracker before calling -[[GGLContext sharedInstance] configureWithError:], -[[GAI sharedInstance] defaultTracker] is the one initialized first. The one initialized through GGLContext can be accessed by either [[GAI sharedInstance] trackerWithTrackingId:"UA-XXXX-Y"] or [GGLContext sharedInstance].tracker.

Extends class GGLContext.