feat: log custom event logging for selectPlacement#52
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds mParticle custom event logging to track every selectPlacements call for improved visibility and troubleshooting. Each time selectPlacements is invoked, a custom event of type "Other" (EventType 8) is logged with both the developer-passed attributes and the final merged attributes sent to Rokt.
Changes:
- Added a new
logSelectPlacementsEventfunction that logs custom events with both original and final attributes as JSON strings - Modified
selectPlacementsto accept and trackdevPassedAttributesparameter - Added comprehensive unit tests for the new logging functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Rokt-Kit.js | Added constant for event name, modified selectPlacements to capture devPassedAttributes, and implemented logSelectPlacementsEvent function |
| test/src/tests.js | Added mParticle.logEvent mock and comprehensive test suite covering various scenarios for the new logging functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…y object and update tests
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…butes to finalAttributes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Testing Plan