chore: remove client-side mParticle batch-stream pipeline#101
Open
alexs-mparticle wants to merge 1 commit into
Open
chore: remove client-side mParticle batch-stream pipeline#101alexs-mparticle wants to merge 1 commit into
alexs-mparticle wants to merge 1 commit into
Conversation
The batch-stream path that forwarded mParticle event batches to the Rokt Transactions Gateway via window.Rokt.__batch_stream__() is now redundant — server-side mParticle integration handles this data independently. Remove: - processBatch / sendBatchStream / drainBatchQueue - batchQueue / batchStreamQueue queuing arrays - enrichCommerceEventTypes commerce override - mergePendingIdentityEvents / buildIdentityEvent / pendingIdentityEvents - ROKT_IDENTITY_EVENT_TYPE enum and RoktIdentityEventType - __batch_stream__ from the RoktGlobal interface IDSync (Workspace search) and per-event placement-flag mapping are untouched. handleIdentityComplete keeps only the userAttributes refresh, so the identity callbacks remain no-op-safe and continue returning their success strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the redundant client-side batch-stream pipeline from the Rokt Kit. The kit no longer calls
window.Rokt.__batch_stream__()or builds/queues mParticle batches. Server-side mParticle integration now handles this data independently.IDSync (Workspace search) and per-event placement-flag mapping are fully preserved — this change is scoped to the batch path only.
Removed
processBatch()sendBatchStream()window.Rokt.__batch_stream__()drainBatchQueue()batchQueue/batchStreamQueueenrichCommerceEventTypes()mergePendingIdentityEvents()/buildIdentityEvent()/pendingIdentityEventsROKT_IDENTITY_EVENT_TYPE/RoktIdentityEventType__batch_stream__?RoktGlobalinterfaceKept (untouched)
process(event)— per-event placement flag mappingonUserIdentified()/search()— Workspace IDSynconLogoutComplete()— clearsuserIdentifiedInWorkspace+ search cacheonLoginComplete()/onModifyComplete()— refresh user attributes, return success stringhandleIdentityComplete()— kept ONLY theuserAttributesrefresh lineselectPlacements()attribute flowRuntime safety
Order-independent with the WSDK rollout: the WSDK guards its call with
typeof __batch_stream__ === 'function', and the mParticle SDK only invokesprocessBatchif the forwarder implements it. DroppingprocessBatchhere is therefore safe to ship before or after the WSDK changes.Verification
npm run lint— PASSnpm run build— PASS (emits IIFE/CJS/ESM)npm run test— PASS (205 tests; 23 batch-stream tests removed)Pre-existing TypeScript type errors in the IDSync code (stale
@mparticle/web-sdktypes, documented in source TODOs) are unrelated and reduced from 8 → 7.dist/artifacts are intentionally not committed (generated by CI release).