MoEngageSDKAppPersonalization
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance from the MoEngagePersonalization module. Fetch campaigns via fetchExperience(experienceKey:...﹚ and track using trackExperienceShown/trackExperienceClicked/trackOfferingShown/trackOfferingClicked.")
@objc
public class MoEngageSDKAppPersonalization : NSObject, @unchecked Sendable
MoEngageSDKAppPersonalization provides APIs to track personalization experience events such as impressions and clicks.
Important
This class is deprecated. UseMoEngageSDKPersonalize.sharedInstance from the
MoEngagePersonalization module instead. Fetch experience campaigns via
MoEngageSDKPersonalize.sharedInstance.fetchExperience(experienceKey:...) and use the
returned MoEngageExperienceCampaign to call the corresponding track methods.
-
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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceShown(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceShown(experienceAttribute: [String : any Sendable], 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperiencesShown(campaigns:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceShown(experienceAttributes: [[String : any Sendable]], 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceShown(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceShown(experienceAttribute: [String : any Sendable])Parameters
experienceAttributeDictionary containing attributes of the experience.
-
Tracks an impression event for multiple experiences for the default workspace.
Declaration
Swift
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperiencesShown(campaigns:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceShown(experienceAttributes: [[String : any Sendable]])Parameters
experienceAttributesArray of dictionaries, each containing attributes of an experience.
-
Tracks a click event for a single experience for a specific workspace.
Declaration
Swift
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceClicked(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceClicked(experienceAttribute: [String : any Sendable], forWorkspaceId workspaceId: String? = nil) -
Tracks a click event for multiple experiences for a specific workspace.
Declaration
Swift
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceClicked(campaign:workspaceId:﹚ from MoEngagePersonalization module. Note: only one campaign can be clicked at a time.") @objc public func experienceClicked(experienceAttributes: [[String : any Sendable]], 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceClicked(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func experienceClicked(experienceAttribute: [String : any Sendable]) -
Tracks a click event for multiple experiences for the default workspace.
Declaration
Swift
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackExperienceClicked(campaign:workspaceId:﹚ from MoEngagePersonalization module. Note: only one campaign can be clicked at a time.") @objc public func experienceClicked(experienceAttributes: [[String : any Sendable]]) -
Tracks an impression event for an offering.
Declaration
Swift
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingShown(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringShown(offeringAttributes: [String : any Sendable], 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingShown(campaign:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringShown(offeringAttributes: [String : any Sendable])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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingClicked(campaign:offeringAttributes:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringClicked(offeringAttributes: [String : any Sendable], withExperienceAttributes experienceAttributes: [String : any Sendable]? = 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingClicked(campaign:offeringAttributes:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringClicked(offeringAttributes: [String : any Sendable], withExperienceAttributes experienceAttributes: [String : any Sendable])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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingClicked(campaign:offeringAttributes:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringClicked(offeringAttributes: [String : any Sendable])