-
Notifications
You must be signed in to change notification settings - Fork 380
change: [M3-9347] - Switch to self hosting Pendo agent in Adobe Launch #12203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change: [M3-9347] - Switch to self hosting Pendo agent in Adobe Launch #12203
Conversation
Cloud Manager UI test results🔺 2 failing tests on test run #5 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts" |
React.useEffect(() => { | ||
if (PENDO_API_KEY && hasConsentEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an explanation of why PR preview links aren't initializing Pendo correctly before this PR's changes:
-
hasConsentEnabled
was our check for the OptanonConsent cookie consent before loading the Pendo script. The preview environment doesn’t have the same domain as the cookie. ThehasConsentEnabled
check for the cookie only works in dev, staging, and prod environments. ThehasConsentEnabled
check has been failing this check for preview environments and that’s still the case in develop. This has been fine, because we didn't need Pendo to be configured in preview environments. We could bypass the consent check and confirm Pendo loads in our local environments. -
The new Adobe Launch script currently bypasses the consent check for only preview environments (side note: I've asked MADS if we can update this to bypass for local too), but until this PR is merged, our preview environments will still not be initializing Pendo because of 1. This PR got rid of just the consent check and confirmed this - Pendo loaded fine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed the Pendo script loaded from the self-hosted source, initialized with the correct Account and Profile ID, and sent request when navigating between pages.
// Fire the first page view for the landing page | ||
window._satellite.track('page view', { | ||
url: window.location.pathname, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious as to why the first page view was not being sent through the useEffect below this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, good question. history.listen only fires when the location changes, and when the user first loads the app, the location hasn't changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed Pendo loading, initializing, and tracking. LGTM. 🚢
linode#12203) * Load the agent from the AL script instead of CDN * Remove the Optanon consent check for launch script to handle * Try to add page view tracking on first page load * Clean up cookie stuff * Update docs * Correct typo and stray console.log * Add a try-catch * Add console log for env vars to debug * Fix numbering in docs * Fix bug - resolve the promise in useScript if the script was already loaded * Add changesets * Update test spec to include new Launch script urls
Description 📝
We are making the change to self-host the Pendo agent scripts, rather than retrieve them from the CDN, at InfoSec's request as a security 'best practice'. See the ticket and ISR for more details.
This is to be rolled out either in the same release as the new Adobe Launch script or after. See the link to the open backend PR in our Jenkins config needed to update the staging and master environments; development/preview environments are already using the new script, which is testable in this PR.
Changes 🔄
Target release date 🗓️
5/20/25 or 6/3/25
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Verification steps
(How to verify changes)
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅