From cc8e24461c625400143677956bdffb9268d8050b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 21 Sep 2017 15:50:05 +0200 Subject: analytics plugin --- .../ios/GAIEcommercePromotion.h | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 StoneIsland/plugins/cordova-plugin-google-analytics/ios/GAIEcommercePromotion.h (limited to 'StoneIsland/plugins/cordova-plugin-google-analytics/ios/GAIEcommercePromotion.h') diff --git a/StoneIsland/plugins/cordova-plugin-google-analytics/ios/GAIEcommercePromotion.h b/StoneIsland/plugins/cordova-plugin-google-analytics/ios/GAIEcommercePromotion.h new file mode 100644 index 00000000..c7bf25af --- /dev/null +++ b/StoneIsland/plugins/cordova-plugin-google-analytics/ios/GAIEcommercePromotion.h @@ -0,0 +1,54 @@ +/*! + @header GAIEcommercePromotion.h + @abstract Google Analytics iOS SDK Hit Format Header + @copyright Copyright 2014 Google Inc. All rights reserved. + */ + +#import + +/*! + * 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]]; + * + */ +@interface GAIEcommercePromotion : NSObject + +/*! + Sets the id that is used to identify a promotion in GA reports. + */ +- (GAIEcommercePromotion *)setId:(NSString *)pid; + +/*! + Sets the name that is used to identify a promotion in GA reports. + */ +- (GAIEcommercePromotion *)setName:(NSString *)name; + +/*! + Sets the name of the creative associated with the promotion. + */ +- (GAIEcommercePromotion *)setCreative:(NSString *)creative; + +/*! + Sets the position of the promotion. + */ +- (GAIEcommercePromotion *)setPosition:(NSString *)position; + +/*! + 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. + */ +- (NSDictionary *)buildWithIndex:(NSUInteger)index; +@end -- cgit v1.2.3-70-g09d2