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
experienceAttributeDictionary containing attributes of the experience.
workspaceIdOptional 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
experienceAttributesArray of dictionaries, each containing attributes of an experience.
workspaceIdOptional 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
experienceAttributeDictionary 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
experienceAttributesArray 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
experienceAttributesArray of dictionaries, each containing attributes of an experience.
workspaceIdOptional 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
offeringAttributesDictionary containing attributes of the offering.
workspaceIdOptional 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
offeringAttributesArray of dictionaries, each containing attributes of an offering.
-
Tracks a click event for an offering.
Note
IfexperienceAttributesis 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
offeringAttributesDictionary containing attributes of the offering.
experienceAttributesOptional dictionary containing attributes of the experience associated with the offering.
workspaceIdOptional workspace identifier. If not provided, the default workspace is used.
-
Tracks a click event for an offering with experience attributes.
Note
IfexperienceAttributesis provided, it will also track the experienceDeclaration
Swift
@objc public func offeringClicked(offeringAttributes: [String : Any], withExperienceAttributes experienceAttributes: [String : Any])Parameters
offeringAttributesDictionary containing attributes of the offering.
experienceAttributesDictionary 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])