The issue description:

I am trying to implement SF SDK in commercial Android application where I have custom implementation of the SF SDK. I handle the presentation and the opening action of the SF marketing push notifications manually, without using the SDK for that purpose (I create the notification View and then I manage the Pending Intent creation by my self).

My marketing team requires from me to implement a SF analytic event, about the moment when the user clicks on the push notification and the Intent screen opens. This event needs to be send to SF dashboard, so they can see how much of the sent marketing pushes are opened by the users.

In this case of custom implementation, I can't relay on the SDK to automatically send the analytic event, so I need to explicitly fire the event from my source code.

I was looking the SDK documentation and objects, but I couldn't find any object or method which is giving me the chance to send that analytic event to the SF dashboard.

Any help or guidance are appreciated,


BTW: I am using ver.6.2.1 of the SDK (the latest one so far)


All I found so far is:

MarketingCloudSdk.getInstance().getAnalyticsManager().trackPageView("data://RegistrationEvent", "Registration Event Completed");

but I don't know how exactly to use it when I want to count the open push notification event in SF dashboard. Or maybe trackPageView() method can't be used for that purpose?


1 Answer 1


You can use redirectForAnalytics when creating the PendingIntent for your notification.

  • That is excellent, but this static method expects NotificationMessage as one of the parameters and I don't know how can I create instance or get the existing instance from somewhere. Also as long as I can see NotificationMessage object should have all the data coming in the push notification payload. Any idea? Thanks Commented May 21, 2019 at 14:24
  • Or maybe the right way is to make custom implementation of this abstract class NotificationMessage and provide the payload in payload() method :). Any better solution? Commented May 21, 2019 at 14:31
  • No, you really shouldn't do that. You should be using the SDK's functionality that allows you full control over the creation of the Notification.Builder that will ultimately be used by the SDK to show the notification. From there you will have access to the NotificationMessage. salesforce-marketingcloud.github.io/JB4A-SDK-Android/…
    – Seth
    Commented May 21, 2019 at 16:44
  • I see, then in this case I don't have any other choice , but to use the standard implementation. I tried with the Simplified Customization as described here salesforce-marketingcloud.github.io/JB4A-SDK-Android/… , but the push notification open event still doesn't appear in the SF dashboard. Maybe I am missing something Commented May 21, 2019 at 23:05
  • Analytics for push open take some time to propagate through the service before they are aggregated and displayed in your analytics dashboard. I believe the expected max time for this is 6 hours. If, after this time, you're still not seeing the open results then please reach out to your support representative for further assistance.
    – Seth
    Commented May 22, 2019 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .