Pumpjack Dataworks Analytics SDK

Report Media

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

Report Video View

When a user views a video.

PJDSDK.sharedInstance.reportEvent(eventType: PJDEventType.WATCHED, inView: "{SCREEN_NAME}", withOptions: ["duration": "50"], category: "category_value")

Report Audio Stream

When a user listens to an audio clip.

PJDSDK.sharedInstance.reportEvent(eventType: PJDEventType.LISTENED, inView: "{SCREEN_NAME}", withOptions: ["duration": "30", "totalDuration": "120"], category: "category_value")

Add End Time

(For WATCHED and LISTENED events) When the user finishes watching the video, call reportEndTime. This will send and finalize the event.

PJDSDK.sharedInstance.reportEndTime()