1

I'm trying to use MarketingCloudSDK 7.4.0 with a Mendix made Android Mobile Application. Mendix is a lowcode platform that uses ReactNative as framework. Therefore, I'm using the react-native-marketingcloudsdk package. The goal is to have an Android app able to receive push notifications and report back the statistics to Salesforce (Inbox push Opened, etc)

Right now, I'm able to receive push notifications properly. However, I'm struggling to report the Analytics of the message to the Salesforce portal. The sample code in the documentation is in Kotlin and I'm not getting success to adapt the code to JScript. For exemple, I've made a binding to call AnalyticsManager.trackInboxOpenEvent from my Jscript and got the error below:

AnalyticsManager: InboxMessage is a Legacy message, null or unknown. Call to trackInboxOpenEvent() ignored.

My question: Does anyone have a ReactNative sample code that report back the statistics to Salesforce. It seems that the code example that comes with the react-native-marketingcloudsdk package does not have this feature enabled.

Any help or comment will be appreciated!

1 Answer 1

0

The Message you're tracking must exist in the SDK's storage ref:

    if (message == null || !storage.getInboxMessageStorage().isKnownMessage(message.id())) {
  MCLogger.w(TAG,
      "InboxMessage is a Legacy message, null or unknown.  Call to trackInboxOpenEvent() ignored.");
  return;
}

So, are you sure you're using an Inbox Message and not just some push message? Also, clicking the notification, if this is an Alert+Inbox message, will automatically track that the message was clicked. What is unknown to the SDK, and the reason for the trackInboxOpenEvent() convenience method, is when the click happens from your Inbox UI that you own and control.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.