Pumpjack Dataworks Analytics SDK

Reporting Views & Events

The SDK can report various types of events to the server.

Note

"category" is not a constant and it has to be defined based on the application events, categories etc.

Report Screen Views

PJDSDK.reportEvent(Context, PJDEvent.VIEWED,SCREEN_NAME, “category”)

Report Tap, Logout and other Events

val screenInfo = HashMap<String, String>()
screenInfo["key1"] = "val1"
screenInfo["key2"] = "val2"
PJDSDK.reportEvent(Context, PJDEvent.CLICKED,SCREEN_NAME, screenInfo, "category")

If you want to report an event when a user logs out of their account in the app.

PJDSDK.reportEvent(Context, PJDEvent.LOGGEDOUT, "ScreenName", "category")

If a user wants to track apps opened, terminated, then these methods can be called from the Application class.

PJDSDK.reportEvent(
this,
PJDEvent.FOREGROUNDED,
"category")
PJDSDK.reportEvent(
this,
PJDEvent.BACKGROUNDED,
"category")

See Appendix A for all types of events available.