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
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], 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]], 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])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]])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], 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]], 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]) -
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]]) -
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], 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])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], 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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingClicked(campaign:offeringAttributes:workspaceId:﹚ from MoEngagePersonalization module.") @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
@available(*, deprecated, message: "Use MoEngageSDKPersonalize.sharedInstance.trackOfferingClicked(campaign:offeringAttributes:workspaceId:﹚ from MoEngagePersonalization module.") @objc public func offeringClicked(offeringAttributes: [String : Any])