ข้อมูลอ้างอิงคลาส GAIEcommerceProductAction

ภาพรวม

คลาสสำหรับสร้างข้อมูลธุรกรรม/การชำระเงินหรือการโต้ตอบอื่นๆ เกี่ยวกับผลิตภัณฑ์สำหรับ Hit ของ 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:
 รหัสที่ไม่ซ้ำกันซึ่งเชื่อมโยงกับธุรกรรม เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setAffiliation:
 กำหนดมูลค่าการเชื่อมโยงของธุรกรรม เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setRevenue:
 กำหนดรายได้รวมของธุรกรรม เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setTax:
 ตั้งค่าภาษีรวมของธุรกรรม เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setShipping:
 กำหนดค่าจัดส่งทั้งหมดของธุรกรรม เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setCouponCode:
 ตั้งค่ารหัสคูปองที่ใช้ในธุรกรรมนี้ เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setCheckoutStep:
 ตั้งค่าความคืบหน้าของกระบวนการชำระเงิน เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setCheckoutOption:
 ตั้งค่าตัวเลือกที่เชื่อมโยงกับการชำระเงิน เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setProductActionList:
 ตั้งชื่อรายการที่เชื่อมโยงกับผลิตภัณฑ์ในบีคอนของ Google Analytics เพิ่มเติม...
 
(GAIEcommerceProductAction *) - setProductListSource:
 ตั้งชื่อแหล่งที่มาของรายการที่เชื่อมโยงกับผลิตภัณฑ์ในบีคอนของ Google Analytics เพิ่มเติม...
 
(พจนานุกรม *)- สร้าง
 สร้าง NSDictionary ของฟิลด์ที่จัดเก็บไว้ในอินสแตนซ์นี้ซึ่งแสดงการทำงานของผลิตภัณฑ์นี้ เพิ่มเติม...
 

เอกสารประกอบของเมธอด

- (GAIEcommerceProductAction *) setAction: (NSString *) productAction

ตั้งค่าฟิลด์การทำงานของผลิตภัณฑ์สำหรับการทำงานของผลิตภัณฑ์นี้

คุณดูค่าที่ถูกต้องได้ใน GAIEcommerceFields.h ในส่วน "มูลค่าการทำงานของผลิตภัณฑ์"

- (GAIEcommerceProductAction *) setTransactionId: (NSString *) transactionId

รหัสที่ไม่ซ้ำกันซึ่งเชื่อมโยงกับธุรกรรม

ค่านี้จะใช้สำหรับ kGAIPAPurchase และ kGAIPARefund เกี่ยวกับผลิตภัณฑ์

- (GAIEcommerceProductAction *) setAffiliation: (NSString *) affiliation

กำหนดมูลค่าการเชื่อมโยงของธุรกรรม

ค่านี้จะใช้สำหรับ kGAIPAPurchase และ kGAIPARefund เกี่ยวกับผลิตภัณฑ์

- (GAIEcommerceProductAction *) setRevenue: (NSNumber *) revenue

กำหนดรายได้รวมของธุรกรรม

ค่านี้จะใช้สำหรับ kGAIPAPurchase และ kGAIPARefund เกี่ยวกับผลิตภัณฑ์

- (GAIEcommerceProductAction *) setTax: (NSNumber *) tax

ตั้งค่าภาษีรวมของธุรกรรม

ค่านี้จะใช้สำหรับ kGAIPAPurchase และ kGAIPARefund เกี่ยวกับผลิตภัณฑ์

- (GAIEcommerceProductAction *) setShipping: (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 ของฟิลด์ที่จัดเก็บไว้ในอินสแตนซ์นี้ซึ่งแสดงการทำงานของผลิตภัณฑ์นี้


โดยปกติแล้วผู้ใช้ไม่จำเป็นต้องเรียกใช้เมธอดนี้