feat: Add placement event mapping for event attributes#57
Merged
alexs-mparticle merged 8 commits intomparticle-integrations:developmentfrom Feb 16, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Expands the Rokt kit’s placement event mapping to also support mapping event attributes (with optional conditional operators) to Rokt local session attributes, while keeping the existing event-type/category/name mapping behavior intact.
Changes:
- Added
placementEventAttributeMappingLookupplus rule evaluation (exists/equals/contains) and application duringprocessEvent. - Parsed new
placementEventAttributeMappingsetting and exposed a test helper to build the lookup. - Added unit tests for lookup generation and conditional attribute mapping behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Rokt-Kit.js |
Implements attribute-based mapping rules and applies them during event processing. |
test/src/tests.js |
Adds unit tests covering lookup generation and condition evaluation for attribute mappings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alexs-mparticle
requested changes
Feb 9, 2026
alexs-mparticle
requested changes
Feb 9, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alexs-mparticle
approved these changes
Feb 10, 2026
jaissica12
approved these changes
Feb 12, 2026
3e67608
into
mparticle-integrations:development
4 checks passed
github-actions bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
# [1.15.0](v1.14.0...v1.15.0) (2026-02-16) ### Features * Add placement event mapping for event attributes ([#57](#57)) ([3e67608](3e67608))
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
Currently in the Rokt Kit, you can only map specific events (Event Type, Event Category, & Event Name) to a Rokt attribute.

This PR expands the existing functionality to map event attributes matching certain conditions to a Rokt attribute.
Example: "Events with url attribute containing
salewill map tosaleseekerRokt attribute.The existing functionality still works as expected. The conditions are stored in a separate object called placementEventAttributeMappingLookup. It will map an array of conditions to the mapped attribute key.
Testing Plan
Testing locally, unit tests, going to make changes to the connection level to add the JSON custom field to allow for the placement event mapping rules