AMAECommerce class
Methods of this class create an AMAECommerce
instance.
For different user actions, there are appropriate types of E-commerce events. To create a specific event type, use the appropriate AMAECommerce
class method.
Note
You can send the AMAECommerce
instance using the +reportECommerce:onFailure: method of the AMAAppMetrica class and the AMAAppMetricaReporting protocol.
Instance methods
Creates an E-commerce event called |
|
Creates an E-commerce event called |
|
Creates an E-commerce event called |
|
Creates an E-commerce event called |
|
Creates an E-commerce event called |
|
Creates an E-commerce event called |
|
Creates an E-commerce event called |
Method descriptions
+showScreenEventWithScreen:
+ (instancetype)showScreenEventWithScreen:(AMAECommerceScreen *)screen
Creates an E-commerce event called ShowScreenEvent
. Use it to report the opening of a page, such as a list of products, search or home page.
Parameters:
|
The screen that was opened. The AMAECommerceScreen class instance. |
Returns:
The AMAECommerce
class instance.
+showProductCardEventWithProduct:screen:
+ (instancetype)showProductCardEventWithProduct:(AMAECommerceProduct *)product
screen:(AMAECommerceScreen *)screen
Creates an E-commerce event called ShowProductCardEvent
. Use it to report viewing a product profile among others on the list.
Note
Before sending the event, make sure that the product profile was shown on the screen for more than N seconds.
Parameters:
|
The product that was shown. The AMAECommerceProduct class instance. |
|
The screen where the product was displayed. The AMAECommerceScreen class instance. |
Returns:
The AMAECommerce
class instance.
+showProductDetailsEventWithProduct:referrer:
+ (instancetype)showProductDetailsEventWithProduct:(AMAECommerceProduct *)product
referrer:(nullable AMAECommerceReferrer *)referrer
Creates an E-commerce event called ShowProductDetailsEvent
. Use it to report viewing a product page.
Parameters:
|
The product that was shown. The AMAECommerceProduct class instance. |
|
Information about the source of traffic to the product page. The AMAECommerceReferrer class instance. |
Returns:
The AMAECommerce
class instance.
+addCartItemEventWithItem:
+ (instancetype)addCartItemEventWithItem:(AMAECommerceCartItem *)item
Creates an E-commerce event called AddCartItemEvent
. Use it to report adding an item to the cart.
Parameters:
|
The item that was added to the cart. The AMAECommerceCartItem class instance. |
Returns:
The AMAECommerce
class instance.
+removeCartItemEventWithItem:
+ (instancetype)removeCartItemEventWithItem:(AMAECommerceCartItem *)item
Creates an E-commerce event called RemoveCartItemEvent
. Use it to report removing an item from the cart.
Parameters:
|
The item that was removed from the cart. The AMAECommerceCartItem class instance. |
Returns:
The AMAECommerce
class instance.
+beginCheckoutEventWithOrder:
+ (instancetype)beginCheckoutEventWithOrder:(AMAECommerceOrder *)order
Creates an E-commerce event called BeginCheckoutEvent
. Use it to report starting a purchase.
Parameters:
|
Information about the purchase. The AMAECommerceOrder class instance. |
Returns:
The AMAECommerce
class instance.
+purchaseEventWithOrder:
+ (instancetype)purchaseEventWithOrder:(AMAECommerceOrder *)order
Creates an E-commerce event called PurchaseEvent
. Use it to report a completed purchase.
Parameters:
|
Information about the purchase. The AMAECommerceOrder class instance. |
Returns:
The AMAECommerce
class instance.