From 8bfee7349f8e351f869170f8c32a14dcb84a734b Mon Sep 17 00:00:00 2001 From: Ruchi Anand Date: Tue, 9 Dec 2025 12:12:31 +0530 Subject: [PATCH 1/7] doc update --- modules/ROOT/pages/pendo-integration.adoc | 30 +++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/modules/ROOT/pages/pendo-integration.adoc b/modules/ROOT/pages/pendo-integration.adoc index 9fe6d35cd..94d40dd0b 100644 --- a/modules/ROOT/pages/pendo-integration.adoc +++ b/modules/ROOT/pages/pendo-integration.adoc @@ -26,17 +26,25 @@ If you do not have a Pendo account, you can link:https://app.pendo.io/register[s == Step 1: Sign in to your Pendo Account -To integrate Pendo in your ThoughtSpot embed, you'll require a script. Before creating the script or using the script provided by ThoughtSpot: +To integrate Pendo in your ThoughtSpot embed, you'll require a script. Before creating your integration script: . Sign in to your Pendo account. . Identify the information you want to capture. . Define visitors and accounts, and segment data. +. Review your existing Pendo implementation in your application to understand how you initialize Pendo (for example, using a React hook, vanilla JavaScript, or other methods). The above information will be used as metadata in the Pendo install script. For more information, refer to the link:https://support.pendo.io/hc/en-us/articles/21326198721563-Choose-IDs-and-metadata[Pendo Documentation, window=_blank]. == Step 2: Create an integration script -The integration requires a script that is designed to install and initialize the Pendo agent within your embed environment. You can either create your own integration script or use the xref:pendo-integration.adoc#_sample_javascript_for_pendo_integration[sample JavaScript] provided by ThoughtSpot. +The integration requires a script that is designed to install and initialize the Pendo agent within your embed environment. + +[IMPORTANT] +==== +**Create your own integration script**: ThoughtSpot strongly recommends that you replicate your own Pendo initialization logic within your own externally hosted JavaScript file for easier management and maintenance. This approach ensures consistency with your existing Pendo implementation and allows you to adapt it to your specific requirements. + +The sample JavaScript provided by ThoughtSpot is an **example only** and may not work for all use cases, particularly in cookieless environments or when using custom authentication flows. +==== The integration script typically includes the following components: @@ -54,14 +62,19 @@ For more information about the Pendo configuration metadata, script creation and * link:https://support.pendo.io/hc/en-us/articles/21326198721563-Choose-IDs-and-metadata[Pendo configuration metadata, window=_blank] === Sample JavaScript for Pendo integration -To assist you with the Pendo integration process, ThoughtSpot provides a sample JavaScript, `pendoIntegrationScript.js`. You can find this sample JavaScript in the link:https://github.com/thoughtspot/developer-examples/blob/main/visual-embed/pendo-integration/pendoIntegrationScript.js[ThoughtSpot Developer examples, window=_blank] GitHub repository. +To assist you with the Pendo integration process, ThoughtSpot provides a sample JavaScript, `pendoIntegrationScript.js`, as a **reference example only**. You can find this sample JavaScript in the link:https://github.com/thoughtspot/developer-examples/blob/main/visual-embed/pendo-integration/pendoIntegrationScript.js[ThoughtSpot Developer examples, window=_blank] GitHub repository. -The `pendoIntegrationScript.js` script is designed to perform the following actions: +[NOTE] +==== +This sample script is provided for reference purposes. It demonstrates how to: * Access custom variables defined in the SDK. It waits for the Visual Embed SDK to initialize and load. * Wait for the user to authenticate successfully and receive information such as user ID, name, email, groups, and account details from the Visual Embed SDK. * Initialize Pendo with the metadata and key, so that Pendo can track the user and their actions within the embedded app. +However, you should create your own script that replicates your application's Pendo initialization logic. For example, if your application uses a React hook to call `pendo.initialize`, adapt that logic to vanilla JavaScript in your hosted script. This ensures consistency with your existing implementation and better compatibility with your authentication and environment setup. +==== + //// * Update Pendo on navigation + Whenever the user navigates to a new page or context within the embedded ThoughtSpot app, the script updates Pendo with the new context information. @@ -71,9 +84,9 @@ It also listens for navigation events within the embedded ThoughtSpot app to cap == Step 3: Host the script on a public site -When your integration script is ready, host it on a publicly accessible domain, such as AWS S3, Azure Blob, or a trusted CDN. +When your integration script is ready, host it on a publicly accessible domain, such as AWS S3, Azure Blob, GitHub, or a trusted CDN. The script must be accessible to ThoughtSpot so it can fetch and inject it into the embed iframe. -Note the hosting domain. +Note the hosting domain and ensure the script URL is publicly accessible. [NOTE] ==== @@ -93,14 +106,15 @@ Wait for ThoughtSpot Support to validate and approve your request. This step is == Step 5: Add the Script source to the CSP Allowlist -After ThoughtSpot enables the integration for your instance: +After ThoughtSpot enables the integration for your instance, you must add your script's hosting domain to the Content Security Policy (CSP) allowlist to ensure ThoughtSpot can fetch and execute your script: . Log in to your ThoughtSpot instance as an administrator. + . Go to the **Develop** page. + If your instance has Orgs, switch to the *All Orgs* context. . In the **Customizations** section, click **Security Settings**. . Check whether the *CSP script-src domains* setting is visible on the *Security Settings* page. -. Add the domain that hosts your script to the **CSP script-src** allowlist. +. Add the domain that hosts your script to the **CSP script-src** allowlist. + +This step is required to allow ThoughtSpot to fetch your script from the hosting domain and inject it into the embed iframe. == Step 6: Define custom variables in the Visual Embed SDK From c7b9de99ed9e8b986d6f2ecf1570b8502887182b Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Thu, 18 Dec 2025 08:06:04 +0530 Subject: [PATCH 2/7] sdk import instructions --- modules/ROOT/pages/onboarding-guide.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/onboarding-guide.adoc b/modules/ROOT/pages/onboarding-guide.adoc index 7a812bff1..28345f500 100644 --- a/modules/ROOT/pages/onboarding-guide.adoc +++ b/modules/ROOT/pages/onboarding-guide.adoc @@ -46,7 +46,7 @@ If you want to embed other ThoughtSpot components and explore the additional cap The latest version of the Visual Embed SDK is available at link:https://www.npmjs.com/package/@thoughtspot/visual-embed-sdk[https://www.npmjs.com/package/@thoughtspot/visual-embed-sdk, window=_blank]. -The SDK is written in TypeScript and is also provided both as ES Module (ESM) and Universal Module Definition (UMD) modules, allowing you to use it in a variety of environments. +The Visual Embed SDK is available as both ES Module (ESM) and Universal Module Definition (UMD) modules, allowing you to use it in a variety of environments. In this example, we'll import the `LiveboardEmbed` SDK package to embed a Liveboard. From ce455f3cf0a9367c78df19ce9be2e5b6067092fd Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Fri, 19 Dec 2025 08:04:46 +0530 Subject: [PATCH 3/7] new favicon --- src/assets/icons/favicon.png | Bin 3741 -> 8579 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/assets/icons/favicon.png b/src/assets/icons/favic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}chucOZUxtU;Q9<6L z<75?KdLUgen*ey2Zopvx*eFb-th8tb7BjFxf_4U=dz?B;gka4!)@WfagXJ~ zW74lPBtn;mM~)X1Z#On{XI#VuG{n8{$KGSP=kXAnjfR;bfXRbdM94jl4R!}!u-JG4 z*sLBB_N+&6?}yIRV-Y=B7k(I`Z*4f=Gxu=)G}75r@o)Fr&Ua@gK_=<#C$wR+59+K> zT3>JnXW_mQ*=hc#Jt1sg{;qqA-WWr`yB*8Arr=pmA4U$D@Fj9g6(rb&6nF@o{Ew*j z5hPl5Ig>JjXK$=+e0lVg0f$$J>4)BaWx=rBBS+p%TGjHi*w-c~!;MwHj8FaXfK2CF z!^jbaSNos-&DfH^9%=XJ!mDG%m+ozJV|K1}(ZOl6K%^#R6 zMXjHi*;%WXMeoN?{z=f{kY_Bu!p-Y1+{*5AZPSSpZkl0A_UvI-Zd$T<@hi)h_r4h% zS5y8{&(yZ@wX^>`sNd#gs;cfhI%4me>8fhJlf7@lhLW+DC$8VMYv5~>hBq}ey*}ih z?d@iZ)tc+y5|xn@)7siPY+YmN+?wZmw_LjPqiff%H#5eAJx*?nyP9D%{>H3v#cdbE-B*s*hF#mt#K`^fmV^78UG9Edfe`qXcymwYnISRHlx z^y$}6h^{M0#aC}tMhz>S7}MM9Se{{GmdGk-MBydWj)+;O(7br_x7@ZP@a zCBfj91*thppGA>aB&ryB)MNc9bNb-p=g$4~0}qi}m9cHe_WJsS!otF<(fiL;&o{+x zNRO2yiC%Z`LUC2qbAu8SH$4+|`0(MAAAfwH?$eigt%zUlJX7~sQ_}!DvU?s)k{Nj| zRq_4Gz_MlQ;)|P`r%nI5V{ZF5_X10orbQ!?dePXH;`jT@V~T5QYbW16NTU6bl^=ak zJurG Date: Wed, 24 Dec 2025 08:41:48 +0530 Subject: [PATCH 4/7] SCAL-288542-2 Update VersionIframe to include pageid in pathname --- src/components/VersionIframe/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 8f86acca5..b90d899e3 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -21,6 +21,7 @@ const VersionIframe: React.FC = ({ const mainUrlParams = new URLSearchParams(window.location.search); if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); + url.pathname += `${mainUrlParams.get('pageid')}/`; } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId')); } From 6ab58425d1679183cb75fff7ecc54d0e63b94d82 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Wed, 24 Dec 2025 10:21:47 +0530 Subject: [PATCH 5/7] SCAL-288542-2 Enhance VersionIframe pathname construction for pageid handling --- src/components/VersionIframe/index.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index b90d899e3..1925c9f5c 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -21,7 +21,23 @@ const VersionIframe: React.FC = ({ const mainUrlParams = new URLSearchParams(window.location.search); if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); - url.pathname += `${mainUrlParams.get('pageid')}/`; + const pageId = mainUrlParams.get('pageid'); + if (pageId === 'graphql-play-ground') { + // Edge case for graphql-play-ground page + url.pathname = 'docs/graphql-play-ground/'; + } else { + const pageIdSplit = pageId.split('__'); + if (pageIdSplit.length > 1) { + // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL + const completePath = `tutorials/${pageIdSplit.join( + '/', + )}/`; + url.pathname += completePath; + } else { + // Other pages are not tutorials with subdirectories, so just add the pageid + url.pathname += `${pageId}/`; + } + } } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId')); } From 30635fc7c7bf9839e70269d1cb244fcfbe1886b8 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Wed, 24 Dec 2025 10:55:53 +0530 Subject: [PATCH 6/7] SCAL-288542-2 added comments --- src/components/VersionIframe/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 1925c9f5c..6dc73a3d5 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -23,7 +23,7 @@ const VersionIframe: React.FC = ({ url.searchParams.set('pageid', mainUrlParams.get('pageid')); const pageId = mainUrlParams.get('pageid'); if (pageId === 'graphql-play-ground') { - // Edge case for graphql-play-ground page + // Edge case for graphql-play-ground page, Redirect to released version of the page url.pathname = 'docs/graphql-play-ground/'; } else { const pageIdSplit = pageId.split('__'); From 5176000ff9f95cd9ccf66d65b50ccdeb3e8a8fd5 Mon Sep 17 00:00:00 2001 From: Shivam Kumar Date: Thu, 25 Dec 2025 21:21:58 +0530 Subject: [PATCH 7/7] SCAL-288542-2 removed the extra logic of playground redirect --- src/components/VersionIframe/index.tsx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/VersionIframe/index.tsx b/src/components/VersionIframe/index.tsx index 6dc73a3d5..fa818aaae 100644 --- a/src/components/VersionIframe/index.tsx +++ b/src/components/VersionIframe/index.tsx @@ -22,21 +22,14 @@ const VersionIframe: React.FC = ({ if (mainUrlParams.has('pageid')) { url.searchParams.set('pageid', mainUrlParams.get('pageid')); const pageId = mainUrlParams.get('pageid'); - if (pageId === 'graphql-play-ground') { - // Edge case for graphql-play-ground page, Redirect to released version of the page - url.pathname = 'docs/graphql-play-ground/'; + const pageIdSplit = pageId.split('__'); + if (pageIdSplit.length > 1) { + // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL + const completePath = `tutorials/${pageIdSplit.join('/')}/`; + url.pathname += completePath; } else { - const pageIdSplit = pageId.split('__'); - if (pageIdSplit.length > 1) { - // Tutorials module pages have pageids like {subdirectory}_{real_url_ending}, must be split to generate matching URL - const completePath = `tutorials/${pageIdSplit.join( - '/', - )}/`; - url.pathname += completePath; - } else { - // Other pages are not tutorials with subdirectories, so just add the pageid - url.pathname += `${pageId}/`; - } + // Other pages are not tutorials with subdirectories, so just add the pageid + url.pathname += `${pageId}/`; } } else if (mainUrlParams.has('pageId')) { url.searchParams.set('pageid', mainUrlParams.get('pageId'));