If you are not seeing "Push Opens" or Click-Through Rate (CTR) statistics for your Android application, the most common cause is the implementation of the onMessageReceived method in your custom push receiver.
This method is part of the Pushwoosh Android SDK and allows you to intercept and process incoming push notifications before they are displayed. The boolean value you return from this method is critical for statistics tracking:
return true;: This signals to the Pushwoosh SDK that you have completely handled the push message within your own code. The SDK will then stop all further processing for that message. This will prevent the SDK from tracking open statistics.return false;: This signals that the Pushwoosh SDK should continue with its default processing, which includes displaying the notification and tracking its open event.
How to Fix the Issue
To ensure your push open statistics are tracked, you must return false from the onMessageReceived method for any push you want Pushwoosh to handle.
- Open the class in your Android project that extends
BasePushMessageReceiver. - Locate the
onMessageReceived(PushMessage message)method. - Review your code to ensure it returns
falsefor standard notifications.
Example:
import com.pushwoosh.BasePushMessageReceiver;
import com.pushwoosh.PushMessage;
public class MyPushReceiver extends BasePushMessageReceiver {
@Override
public boolean onMessageReceived(PushMessage message) {
// Your custom logic to inspect the push payload can go here.
// For example, you might handle a silent "data-only" push differently.
// To ensure Pushwoosh tracks opens, you must return false.
// Returning true here will stop the SDK from tracking statistics.
return false;
}
}
If you have logic that sometimes handles pushes manually, make sure it only returns true in those specific cases, and returns false for all others where you expect standard tracking and display behavior.
Comments
0 comments
Please sign in to leave a comment.