onKlaviyoCustomDataMessageReceived

open fun onKlaviyoCustomDataMessageReceived(customData: Map<String, String>, message: RemoteMessage)

Called when a Klaviyo push message containing custom key-value pairs is received.

This method is designed to be overridden by subclasses to provide custom handling for Klaviyo messages that include additional custom data. By default, it logs the received custom key-value pairs along with the RemoteMessage. Subclasses can override this method to process the custom data, perform background operations, or implement any other behavior tailored to the additional information.

The default implementation is invoked from the onMessageReceived logic when a Klaviyo message includes key-value pairs. If you require different behavior for handling such messages, simply override this method in your subclass of KlaviyoPushService and implement your custom logic.

Parameters

customData

A Map of custom key-value pairs extracted from the Klaviyo message.

message

The RemoteMessage object representing the received push notification.