Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.

<GAITracker> Protocol Reference

Overview

Google Analytics tracking interface.

Obtain instances of this interface from [GAI trackerWithTrackingId:] to track screens, events, transactions, timing, and exceptions. The implementation of this interface is thread-safe, and no calls are expected to block or take a long time. All network and disk activity will take place in the background.

Inherits <NSObject>.

Instance Methods

(void) - set:value:
 Set a tracking parameter. More...
 
(NSString *) - get:
 Get a tracking parameter. More...
 
(void) - send:
 Queue tracking information with the given parameter values. More...
 

Properties

NSString * name
 Name of this tracker. More...
 
BOOL allowIDFACollection
 Allow collection of IDFA and related fields if set to true. More...
 

Method Documentation

- (void) set: (NSString *)  parameterName
value: (NSString *)  value 

Set a tracking parameter.

Parameters
parameterNameThe parameter name.
valueThe value to set for the parameter. If this is nil, the value for the parameter will be cleared.
- (NSString *) get: (NSString *)  parameterName

Get a tracking parameter.

Parameters
parameterNameThe parameter name.
Returns
The parameter value, or nil if no value for the given parameter is set.
- (void) send: (NSDictionary *)  parameters

Queue tracking information with the given parameter values.

Parameters
parametersA map from parameter names to parameter values which will be set just for this piece of tracking information, or nil for none.

Property Documentation

- (NSString*) name
(readonly, nonatomic)

Name of this tracker.

- (BOOL) allowIDFACollection
(readwrite, nonatomic, assign)

Allow collection of IDFA and related fields if set to true.

Default is false.