-
Notifications
You must be signed in to change notification settings - Fork 367
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-9159] - Enable Pendo based on OneTrust cookie consent #11564
Open
mjac0bs
wants to merge
9
commits into
linode:develop
Choose a base branch
from
mjac0bs:M3-9159-pendo-one-trust
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mjac0bs
added
the
Analytics
Relating to Analytics migration project or Adobe Analytics
label
Jan 23, 2025
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
mjac0bs
force-pushed
the
M3-9159-pendo-one-trust
branch
from
January 24, 2025 15:55
d64b33d
to
0222cae
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
mjac0bs
requested review from
bnussman-akamai and
coliu-akamai
and removed request for
a team
January 24, 2025 18:36
Coverage Report: ✅ |
Cloud Manager UI test results🎉 482 passing tests on test run #5 ↗︎
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📝
This PR enables the Pendo analytics script based on the OneTrust cookie consent granted by the user in their cookie preferences. If users disable performance cookies, the Pendo script will not load.
Once we release this change to production, we should be able to change a setting in our Pendo app subscription that has disabled cookies and client side storage use. The Login team needs cookies enabled on our subscription to allow for journey tracking between the anonymous users on Login and Cloud Manager's users.
Changes 🔄
usePendo.js
hook to check for consent enablement before loading the scriptgetCookie
,checkOptanonConsent
) to handle this inanalytics/utils.ts
analytics/utils.test.ts
Target release date 🗓️
2/11/25
How to test 🧪
Verification steps
(How to verify changes)
Check out this PR and go to http://localhost:3000
Log out of whatever account you're in. At login.linode.com, select Cookie Preferences at the bottom of the screen
Disable the Performance Cookies setting by toggling it off
In your code editor, go to L80 of
usePendo.js
and change the condition forconst hasConsentEnabled = !APP_ROOT.includes('localhost')
to remove the!
. In this PR, we want to confirm that the OneTrust cookie works locally, but normally we don't want to have to do these steps to enable Pendo for local development.Open the browser dev tools and go to Application > Cookies and view the table of cookies
Find the
OptanonConsent
cookie and copy its value to your clipboard. Be sure to uncheck theShow URL decoded
optionAdd a new OptanonConsent cookie for localhost for testing purposes. We can't read cookies with a different domain with
document.cookie
. To add a new cookie, click an empty cell at the bottom of the table. Name itOptanonConsent
and copy the value from the linode.com cookie into the localhostOptanonConsent
cookie.If you want to confirm that OptanonConsent is now being returned in
document.cookie
, use the browser console to log the value fordocument.cookie
.Refresh the page and confirm that Pendo has respected your cookie setting and NOT loaded, which you can do via any of the following:
<head>
tag (it's the script withcontent.psp.cloud.linode.com
)psp.
and confirm there are no requestspendo.validateEnvironment()
and confirm the command failsRepeat the steps above, but with an Enabled Performance Cookie setting to confirm Pendo is loaded and sending data
OptanonConsent
cookie value so thatC0002%3A0
isC0002%3A1
. C0002 is the 'Performance Cookie' group; 0 is disabled, 1 is enabledEnsure tests pass:
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 ✅