Skip to content

feat: add BatchListener to forward mParticle batches to Rokt SDK#144

Draft
jaissica12 wants to merge 1 commit into
mainfrom
feat/batch-stream-forwarding
Draft

feat: add BatchListener to forward mParticle batches to Rokt SDK#144
jaissica12 wants to merge 1 commit into
mainfrom
feat/batch-stream-forwarding

Conversation

@jaissica12
Copy link
Copy Markdown

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • Implements KitIntegration.BatchListener interface on RoktKit, enabling the kit to receive full mParticle event batches via the logBatch(JSONObject) callback
  • Forwards the raw batch JSON to the Rokt SDK via the new Rokt.receiveMParticleBatch() API (added in sdk-android-source feat/mp-batch-stream)
  • This enables the Rokt Transactions API to receive the full mParticle event stream (custom events, commerce events, screen views, session events) alongside native Rokt SDK events
  • Errors during batch forwarding are caught and logged as warnings — they do not crash the host app or interfere with other kit functionality
  • No changes to existing placement execution, event streaming, or identity forwarding logic

Testing Plan

  • Was this tested locally? If not, explain why.
  • Pending integration test: requires a published Rokt SDK version with Rokt.receiveMParticleBatch() (from sdk-android-source/feat/mp-batch-stream)
  • Unit test to verify logBatch() calls Rokt.receiveMParticleBatch() with the correct JSON string
  • Unit test to verify exceptions in receiveMParticleBatch() are caught and do not propagate
  • E2E validation: confirm batch events appear in Transactions API /v2/sessions/events response

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

- Implement KitIntegration.BatchListener interface
- Forward full mParticle batch JSON via Rokt.receiveMParticleBatch()
- Enables Transactions API to receive mParticle event stream alongside native Rokt events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant