Skip to content

feat: Embed Thank You Element in Joint SDK#89

Open
zach-will wants to merge 3 commits intomparticle-integrations:mainfrom
zach-will:feature/Embedd-tye-injoint-sdk
Open

feat: Embed Thank You Element in Joint SDK#89
zach-will wants to merge 3 commits intomparticle-integrations:mainfrom
zach-will:feature/Embedd-tye-injoint-sdk

Conversation

@zach-will
Copy link
Copy Markdown

@zach-will zach-will commented Apr 21, 2026

Background

Today, partners need to load Rokt resources independently in order to use shoppable ads. This has introduced confusion and added integration complexity. To simplify this, the Joint SDK will now be responsible for fetching the Thank You Element (TYE).

What Changed

  • Rokt Kit now handles the thank-you-journey extension as a special case. When this extension is present, it is no longer appended to the Rokt launcher URL. Instead, Rokt kit will fetch the TYE resource and register the extension with WSDK.
  • mParticle.rokt.use has been deprecated, as this functionality is now handled internally.
  • Updated TsConfig to fix local development issues with vitest

Testing and Verification

  • Conducted local test using stub config data.

Media

TODO

Expected config:

      "roktExtensions": [
        {"jsmap": null, "map": null, "maptype": "StaticList", "value": "instant-purchase"},
        {"jsmap": null, "map": null, "maptype": "StaticList", "value": "experiment-monitoring"},
        {"jsmap": null, "map": null, "maptype": "StaticList", "value": "thank-you-journey"}
      ],

@zach-will zach-will changed the title [test]: Embedd TYE in Joint SDK [test]: Embed TYE in Joint SDK Apr 21, 2026
@rmi22186 rmi22186 changed the title [test]: Embed TYE in Joint SDK feat: Embed Than You Element in Joint SDK Apr 21, 2026
Copy link
Copy Markdown
Collaborator

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

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

Looking good! Can you add a few tests also?

Comment thread src/Rokt-Kit.ts Outdated
Comment thread src/Rokt-Kit.ts Outdated
Comment thread src/Rokt-Kit.ts Outdated
Comment thread src/Rokt-Kit.ts
Comment on lines +338 to +342
function registerLegacyExtensions(legacyExtensions: string[]) {
for (const extension of legacyExtensions) {
window.mParticle.Rokt.use(extension);
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this necessary? I thought we are doing this in the new script creation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yup. This is necessary to initialize the WSDK thank you page extension manager.

Comment thread src/Rokt-Kit.ts Outdated
Comment thread src/Rokt-Kit.ts Outdated
return [generateBaseUrl(domain), thankYouElementPath].join('');
}

function generateBaseUrl(domain: string |undefined) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
function generateBaseUrl(domain: string |undefined) {
function generateBaseUrl(domain: string | undefined) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, will this ever return undefined if we are generating just the base portion of a URL?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

generateBaseUrl will never return undefined. I believe parameter needs to have the union to support cname?

Comment thread src/Rokt-Kit.ts
return baseUrl + '?extensions=' + extensions.join(',');
}

function generateThankYouElementScript(domain: string | undefined) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will this ever be undefined?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I believe it will be if partners don't define ROKT_DOMAIN.

@rmi22186 rmi22186 changed the title feat: Embed Than You Element in Joint SDK feat: Embed Thank You Element in Joint SDK Apr 21, 2026
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.

2 participants