sfmcsdk / com.salesforce.marketingcloud.sfmcsdk.components.events / EventManager

EventManager

class EventManager

Class which helps in creating a EventManager for each module . This is initialised when SFMCSdk.configure is called and each Module via Config has its own EventManager

Functions

subscribe

Method to register a subscriber for Event

fun subscribe(subscriber: EventSubscriber): Unit

track

Method to track events from Module via SFMCSdkComponents.eventManager

fun track(vararg events: Event): Unit

unsubscribe

Method to de-register a subscriber for Event

fun unsubscribe(subscriber: EventSubscriber): Unit

Companion Object Properties

TAG

const val TAG: String

Companion Object Functions

customEvent

This method helps in creating a Event with provided properties

fun customEvent(name: String, attributes: Map<String, Any> = mapOf(), producer: Producer = SFMC_SDK, category: Category = ENGAGEMENT): Event?