總覽
用來為 Google Analytics (分析) 命中建立交易/結帳或其他產品互動相關資訊的類別。
請使用這個類別,針對已售出、已查看或退款的產品回報相關資訊。此類別應與 GAIDictionaryBuilder 搭配使用。
一般用途:
[tracker set:kGAIScreenName value:@"MyScreen"]; GAIDictionaryBuilder *builder = [GAIDictionaryBuilder createScreenView]; GAIEcommerceProductAction *action = [[GAIEcommerceProductAction alloc] init]; [action setAction:kGAIPAPurchase]; [action setTransactionId:@"TT-1234"]; [action setRevenue:@3.14]; [action setCouponCode:@"EXTRA100"]; [builder setProductAction:action]; GAIEcommerceProduct *product = [[GAIEcommerceProduct alloc] init]; [product setId:@""PID-1234""]; [product setName:@"Space Monkeys!"]; [product setPrice:@100]; [product setQuantity:@2]; [builder addProduct:product]; [tracker send:[builder build]];
沿用 NSObject。
執行個體方法 | |
(GAIEcommerceProductAction *) | - setAction: |
設定這個產品動作的產品動作欄位。更多... | |
(GAIEcommerceProductAction *) | - setTransactionId: |
與交易相關聯的專屬 ID。更多... | |
(GAIEcommerceProductAction *) | - setAffiliation: |
設定交易的聯盟值。更多... | |
(GAIEcommerceProductAction *) | - setRevenue: |
設定交易的總收益。更多... | |
(GAIEcommerceProductAction *) | - setTax: |
設定交易的總稅金。更多... | |
(GAIEcommerceProductAction *) | - setshipping: |
設定交易的總運費。更多... | |
(GAIEcommerceProductAction *) | - setCouponCode: |
設定這筆交易使用的優待券代碼。更多... | |
(GAIEcommerceProductAction *) | - setCheckoutStep: |
設定結帳程序的進度。更多... | |
(GAIEcommerceProductAction *) | - setCheckoutOption: |
設定與結帳相關聯的選項。更多... | |
(GAIEcommerceProductAction *) | - setProductActionList: |
設定與 Google Analytics (分析) 信標中產品相關聯的清單名稱。更多... | |
(GAIEcommerceProductAction *) | - setProductListSource: |
設定與 Google Analytics (分析) 信標中產品相關聯的清單來源名稱。更多... | |
(NSDictionary *) | - 建構 |
建立儲存在這個執行個體中的欄位 NSDictionary。更多... | |
方法說明文件
- (GAIEcommerceProductAction *) setAction: | (NSString *) | productAction |
設定這個產品動作的產品動作欄位。
您可以在 GAIecommerceFields.h 的「product action value」下方找到有效值。
- (GAIEcommerceProductAction *) setTransactionId: | (NSString *) | transactionId |
與交易相關聯的專屬 ID。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) 設定聯盟: | (NSString *) | affiliation |
設定交易的聯盟值。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) setRevenue: | (NSNumber *) | revenue |
設定交易的總收益。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) setTax: | (NSNumber *) | tax |
設定交易的總稅金。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) 已設定運送: | (NSNumber *) | shipping |
設定交易的總運費。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) SetCouponCode: | (NSString *) | couponCode |
設定這筆交易使用的優待券代碼。
這個值用於 kGAIPAPurchase 和 kGAIPARefund 產品動作。
- (GAIEcommerceProductAction *) setCheckoutStep: | (NSNumber *) | checkoutStep |
設定結帳程序的進度。
這個值用於 kGAICheckout 和 kGAICheckoutOptions 產品動作。
- (GAIEcommerceProductAction *) setCheckoutOption: | (NSString *) | checkoutOption |
設定與結帳相關聯的選項。
這個值用於 kGAICheckout 和 kGAICheckoutOptions 產品動作。
- (GAIEcommerceProductAction *) setProductActionList: | (NSString *) | productActionList |
設定與 Google Analytics (分析) 信標中產品相關聯的清單名稱。
這個值用於 kGAIPADetail 和 kGAIPAClick 產品動作。
- (GAIEcommerceProductAction *) setProductListSource: | (NSString *) | productListSource |
設定與 Google Analytics (分析) 信標中產品相關聯的清單來源名稱。
這個值用於 kGAIPADetail 和 kGAIPAClick 產品動作。
- (NSDictionary *) 版本 |
建立儲存在這個執行個體中的欄位 NSDictionary。
一般而言,使用者不需要呼叫此方法。