SDK Event and Action Types

This article describes how to access event and action types.

Events

The available events are as follows:

  • RecordImpressions
  • RecordPageEvents
  • RecordRecClicks
  • RecordRecImpressions
  • ContextIpAddress
  • ContextCustomVariables
  • ContextUserAgent
  • ContextPageView
  • ContextCart
  • ContextAddToCart
  • ContextPurchase
  • ContextMetadata
  • ContextProductDetailView
  • ContextProductThumbnailView
  • ContextReferrer
  • ContextCoordinates
  • ContextScreenSize
  • ContextClosedSession

Events are defined in the monetate_ios_sdk package. Import this package with the following code:

import monetate_ios_sdk

Once imported, you can reference these events using the syntax .<event name>. For example, RecordImpressions is referenced by .RecordImpressions.

Actions

The available actions are as follows:

  • OmnichannelJson (monetate:action:OmnichannelJson)
  • OmniChannelImageBadging (monetate:action:OmniChannelImageBadging)
  • OmnichannelRecommendation (monetate:action:OmnichannelRecommendation)
  • SocialProofDataV2 (monetate:action:SocialProofDataV2)
  • DataCollection (monetate:action:DataCollection)
  • NoAction (monetate:action:NoAction)

Actions are defined in the monetate_ios_sdk package. Import this package with the following code:

import monetate_ios_sdk

Once imported, you can reference these actions using the associated names listed above. For example, OmniChannelJson is referenced by monetate:action:OmnichannelJson. Full code block example:

objPersonalization.getActionsData(
  requestId: "123456",
  includeReporting: false,
  arrActionTypes: ["monetate:action:OmnichannelJson", "monetate:action:OmnichannelRecommendation"]).on { res in
  if res.status == 200 {
    self.handleRecommendations(res: res)
  } else {
  }
}