feat: Embed Thank You Element in Joint SDK#89
feat: Embed Thank You Element in Joint SDK#89zach-will wants to merge 3 commits intomparticle-integrations:mainfrom
Conversation
rmi22186
left a comment
There was a problem hiding this comment.
Looking good! Can you add a few tests also?
| function registerLegacyExtensions(legacyExtensions: string[]) { | ||
| for (const extension of legacyExtensions) { | ||
| window.mParticle.Rokt.use(extension); | ||
| } | ||
| } |
There was a problem hiding this comment.
Is this necessary? I thought we are doing this in the new script creation.
There was a problem hiding this comment.
Yup. This is necessary to initialize the WSDK thank you page extension manager.
| return [generateBaseUrl(domain), thankYouElementPath].join(''); | ||
| } | ||
|
|
||
| function generateBaseUrl(domain: string |undefined) { |
There was a problem hiding this comment.
| function generateBaseUrl(domain: string |undefined) { | |
| function generateBaseUrl(domain: string | undefined) { |
There was a problem hiding this comment.
Actually, will this ever return undefined if we are generating just the base portion of a URL?
There was a problem hiding this comment.
generateBaseUrl will never return undefined. I believe parameter needs to have the union to support cname?
| return baseUrl + '?extensions=' + extensions.join(','); | ||
| } | ||
|
|
||
| function generateThankYouElementScript(domain: string | undefined) { |
There was a problem hiding this comment.
Will this ever be undefined?
There was a problem hiding this comment.
I believe it will be if partners don't define ROKT_DOMAIN.
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
thank-you-journeyextension 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.usehas been deprecated, as this functionality is now handled internally.Testing and Verification
Media
TODO
Expected config: