MoEngageSDKAppPersonalization
@objc
public class MoEngageSDKAppPersonalization : NSObject
MoEngageSDKAppPersonalization provides APIs to track personalization experience events such as impressions and clicks.
-
Shared singleton instance for accessing personalization APIs.
Declaration
Swift
@objc public static let sharedInstance: MoEngageSDKAppPersonalization
-
Tracks an impression event for a single experience.
Declaration
Swift
@objc public func experienceShown(experienceAttribute: [String : Any], forWorkspaceId workspaceId: String? = nil)
Parameters
experienceAttribute
Dictionary containing attributes of the experience.
workspaceId
Optional workspace identifier. If not provided, the default workspace is used.
-
Tracks an impression event for multiple experiences.
Declaration
Swift
@objc public func experienceShown(experienceAttributes: [[String : Any]], forWorkspaceId workspaceId: String? = nil)
Parameters
experienceAttributes
Array of dictionaries, each containing attributes of an experience.
workspaceId
Optional workspace identifier. If not provided, the default workspace is used.
-
Tracks an impression event for a single experience for the default workspace.
Declaration
Swift
@objc public func experienceShown(experienceAttribute: [String : Any])
Parameters
experienceAttribute
Dictionary containing attributes of the experience.
-
Tracks an impression event for multiple experiences for the default workspace.
Declaration
Swift
@objc public func experienceShown(experienceAttributes: [[String : Any]])
Parameters
experienceAttributes
Array of dictionaries, each containing attributes of an experience.
-
Tracks a click event for a single experience for a specific workspace.
Declaration
Swift
@objc public func experienceClicked(experienceAttribute: [String : Any], forWorkspaceId workspaceId: String? = nil)
-
Tracks a click event for multiple experiences for a specific workspace.
Declaration
Swift
@objc public func experienceClicked(experienceAttributes: [[String : Any]], forWorkspaceId workspaceId: String? = nil)
Parameters
experienceAttributes
Array of dictionaries, each containing attributes of an experience.
workspaceId
Optional workspace identifier. If not provided, the default workspace is used.
-
Tracks a click event for a single experience for the default workspace.
Declaration
Swift
@objc public func experienceClicked(experienceAttribute: [String : Any])
-
Tracks a click event for multiple experiences for the default workspace.
Declaration
Swift
@objc public func experienceClicked(experienceAttributes: [[String : Any]])
-
Tracks an impression event for an offering.
Declaration
Swift
@objc public func offeringShown(offeringAttributes: [String : Any], forWorkspaceId workspaceId: String? = nil)
Parameters
offeringAttributes
Dictionary containing attributes of the offering.
workspaceId
Optional workspace identifier. If not provided, the default workspace is used.
-
Tracks an impression event for multiple offerings.
Declaration
Swift
@objc public func offeringShown(offeringAttributes: [String : Any])
Parameters
offeringAttributes
Array of dictionaries, each containing attributes of an offering.
-
Tracks a click event for an offering.
Note
IfexperienceAttributes
is provided, it will also track the experience click event.Declaration
Swift
@objc public func offeringClicked(offeringAttributes: [String : Any], withExperienceAttributes experienceAttributes: [String : Any]? = nil, forWorkspaceId workspaceId: String? = nil)
Parameters
offeringAttributes
Dictionary containing attributes of the offering.
experienceAttributes
Optional dictionary containing attributes of the experience associated with the offering.
workspaceId
Optional workspace identifier. If not provided, the default workspace is used.
-
Tracks a click event for an offering with experience attributes.
Note
IfexperienceAttributes
is provided, it will also track the experienceDeclaration
Swift
@objc public func offeringClicked(offeringAttributes: [String : Any], withExperienceAttributes experienceAttributes: [String : Any])
Parameters
offeringAttributes
Dictionary containing attributes of the offering.
experienceAttributes
Dictionary containing attributes of the experience associated with the offering.
-
Tracks a click event for an offering without experience attributes.
Note
This will track the click event for the offering without any associated experience eventsDeclaration
Swift
@objc public func offeringClicked(offeringAttributes: [String : Any])