GAIEcommercePromotion Class Reference

Overview

Class to construct promotion related fields for Google Analytics hits.

The fields from this class can be used to represent internal promotions that run within an app, such as banners, banner ads etc.

Typical usage:

GAIDictionaryBuilder *builder = [GAIDictionaryBuilder createScreenView];
GAIEcommercePromotion *promotion = [[GAIEcommercePromotion alloc] init];
[promotion setId:@"PROMO-ID1234"];
[promotion setName:@"Home screen banner"];
[builder set:kGAIPromotionClick forKey:kGAIPromotionAction];
[builder addPromotion:promotion];
[tracker send:builder.build]];

Inherits NSObject.

Instance Methods

(GAIEcommercePromotion *) - setId:
 Sets the id that is used to identify a promotion in GA reports. More...
 
(GAIEcommercePromotion *) - setName:
 Sets the name that is used to identify a promotion in GA reports. More...
 
(GAIEcommercePromotion *) - setCreative:
 Sets the name of the creative associated with the promotion. More...
 
(GAIEcommercePromotion *) - setPosition:
 Sets the position of the promotion. More...
 
(NSDictionary *) - buildWithIndex:
 Builds an NSDictionary of fields stored in this instance. More...
 

Method Documentation

- (GAIEcommercePromotion *) setId: (NSString *)  pid

Sets the id that is used to identify a promotion in GA reports.

- (GAIEcommercePromotion *) setName: (NSString *)  name

Sets the name that is used to identify a promotion in GA reports.

- (GAIEcommercePromotion *) setCreative: (NSString *)  creative

Sets the name of the creative associated with the promotion.

- (GAIEcommercePromotion *) setPosition: (NSString *)  position

Sets the position of the promotion.

- (NSDictionary *) buildWithIndex: (NSUInteger)  index

Builds an NSDictionary of fields stored in this instance.

The index parameter is the index of this promotion in that promotion list.
Normally, users will have no need to call this method.