This document describes a legacy version of the iOS SDK. If your new to Analyitcs, use the latest SDK. Learn more

<GAITracker> Protocol Reference

Stay organized with collections Save and categorize content based on your preferences.

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.