Skip to content

feat: Add placement event mapping for event attributes#57

Merged
alexs-mparticle merged 8 commits intomparticle-integrations:developmentfrom
prestonstarkey:feat/LE-add-event-mapping-configuration
Feb 16, 2026
Merged

feat: Add placement event mapping for event attributes#57
alexs-mparticle merged 8 commits intomparticle-integrations:developmentfrom
prestonstarkey:feat/LE-add-event-mapping-configuration

Conversation

@prestonstarkey
Copy link
Contributor

Summary

Currently in the Rokt Kit, you can only map specific events (Event Type, Event Category, & Event Name) to a Rokt attribute.
image

This PR expands the existing functionality to map event attributes matching certain conditions to a Rokt attribute.

Example: "Events with url attribute containing sale will map to saleseeker Rokt 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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 placementEventAttributeMappingLookup plus rule evaluation (exists / equals / contains) and application during processEvent.
  • Parsed new placementEventAttributeMapping setting 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 alexs-mparticle merged commit 3e67608 into mparticle-integrations:development Feb 16, 2026
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))
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.

3 participants

Comments