feat: Add Extensions to Rokt Kit#26
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for vNext Extensions to the Rokt Kit by introducing new functions for generating launcher scripts and extracting extension data. The key changes include:
- Adding unit tests in test/src/tests.js for generating launcher scripts with various extension inputs.
- Implementing new functions (generateLauncherScript, parseSettingsString, extractvNextExtensions) to support vNext Extensions in src/Rokt-Kit.js.
- Integrating the extension data with the Rokt SDK via a new setExtensionData method.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/src/tests.js | Adds comprehensive unit tests for validating launcher script generation and extension extraction. |
| src/Rokt-Kit.js | Implements vNextExtensions support including parsing settings and generating launcher URLs. |
Comments suppressed due to low confidence (1)
src/Rokt-Kit.js:28
- [nitpick] The local variable 'roktLauncherScript' declared inside the constructor shadows the earlier module-level declaration; consider renaming it to clarify its scope and intended usage.
var roktLauncherScript = '';
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for vNext Extensions to the Rokt Kit by introducing new helper functions and modifying the launcher script generation to correctly append extensions.
- Introduces a constant mapping (VNEXT_EXTENSIONS) for known extension names.
- Adds the generateLauncherScript helper to build URLs with extension query parameters.
- Implements functions to extract vNext extensions from settings and to set extension data, along with corresponding tests.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Rokt-Kit.js | Implements vNext Extension support, helper functions for URL generation and data mapping |
| test/src/tests.js | Adds tests for generateLauncherScript and extractvNextExtensions functions |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for vNext Extensions to the Rokt Kit, allowing users to configure extension data and generate a launcher script URL with query parameters based on a list of extensions. Key changes include:
- Introduction of a constant mapping (ROKT_EXTENSIONS) and helper functions (generateLauncherScript, extractRoktExtensions, and setExtensionData) in the kit.
- Enhancements in test coverage to validate URL generation and correct mapping of extension names.
- Modifications to the script insertion logic in attachLauncher to incorporate extension parameters.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/src/tests.js | Added tests for generateLauncherScript and extractRoktExtensions |
| src/Rokt-Kit.js | Implemented support for extensions, including new helper methods and integration in the launcher creation process |
rmi22186
left a comment
There was a problem hiding this comment.
approving, but we need to confirm with ignacio/sarthi how long adding a new cusom json mapping would take still
d379eaa to
c3d24d9
Compare
c3d24d9 to
1db3c91
Compare
# [1.6.0](v1.5.0...v1.6.0) (2025-07-14) ### Bug Fixes * Prevent mutation of global launcherOptions during initialization ([#36](#36)) ([0f36fac](0f36fac)) ### Features * Add Extensions to Rokt Kit ([#26](#26)) ([73e9696](73e9696)) * Support adding identities to select placement attributes ([#35](#35)) ([f9595ea](f9595ea))
Summary
Testing Plan
offer-container,cancel-buttonandconfirm-button.setExtensionDatausing the following in the dev console:https://apps.rokt.com/v1/eventswith:SignalPartnerImpressionSignalPartnerResponseSignalPartnerDismissal