Event Code Samples

Android Event Code Samples

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

Metadata Event

ContextMetadata Event Code Example


Screen Size Event

ContextScreenSize Event Code Example


User Agent Event

Imports UserAgent data from the device. This data represents information about the device of the customer.

ContextUserAgent Event Code Example


Product View Event

ContextProductView Event Code Example


Coordinates Event

Reports the coordinates of the customer.

ContextCoordinates Event Code Example


Referrer Event

Reports the referrer.

ContextReferrer Event Code Example


Custom Variable Event

ContextCustomVariables Event Code Example


PageEvents Event

Reports any events on the page.

PageEvents Event Code Example


Page View Event

Reports when a customer views a specified page.

ContextPageView Event Code Example


Product Thumbnail Event

Reports when a customer views a product thumbnail.

ContextProductThumbnailView Event Code Example


Product Detail View Event

Reports when a customer views a product detail page.

ContextProductDetailView Event Code Example


Recommendation Clicks Event

Reports recommendations click events.

RecordRecClicks Event Code Example


Recommendation Impressions Event

Reports recommendations impression events.

RecordRecImpressions Event Code Example


Impressions Event

Reports impression events.

RecordImpressions Event Code Example


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.

ContextCart Event Code Example


Add to Cart Event

ContextAddToCart Event Code Example


IpAddress Event

ContextIpAddress Event Code Example


Purchase Event

ContextPurchase Event Code Example