Event Code Samples

iOS Event Code Samples

The following events are available to use in the iOS version of the Monetate SDK.

Metadata Event

Metadata Event Code Example


Screen Size Event

ScreenSize Event Code Example


User Agent Event

UserAgent Event Code Example


Coordinates Event

Reports the coordinates of the customer.

coordinates Event Code Example


Referrer Event

Reports the referrer.

referrer Event Code Example


Custom Variable Event

Reports custom variables.

customVariable Event Code Example


Page Event

Reports any events on the page.

pageEvent Code Example


Page View Event

Reports when a customer views a specified page.

Page View Event Code Example


Product Thumbnail Event

Reports when a customer views a product thumbnail.

ProductThumbnailView Event Code Example


Product Detail View Event

Reports when a customer views a product detail page.

ProductDetailView Event Code Example


Recommendation Clicks Event

Reports recommendations click events.

RecClicks Event Code Example


Recommendation Impressions Event

Reports recommendations impression events.

RecImpressions Event Code Example


Impressions Event

Reports impression events.

Impressions Event Code Example


Add to Cart Event

Reports when a customer adds a product to their cart. Import and use the CartLinesData interface for this event. CartLine is the data structure used by this interface.

Add to Cart Event Code Example


Purchase Event

Reports when a customer purchases products. Import and use the PurchaseData interface for this event. PurchaseLine is the data structure used by this interface.

Purchase Event Code Example


Decision Event

This event doesn't need to be created. The SDK automatically creates a decision event when you use the getActions method and pass a requestID as a string and includeReporting as a bool, respectively.