-
Notifications
You must be signed in to change notification settings - Fork 350
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
Add "do not track" query parameter to vimeo links in the video widget to ensure tracking/analytics cookies don't get set. #795
Conversation
… to ensure tracking/analytics cookies don't get set. Issue: https://khanacademy.atlassian.net/browse/INFRA-9620 Test plan: - tested that parameter got added in video widget in storybook
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: Published🎉 Good news!! We've packaged up the latest commit from this PR (d936786) and published it to npm. You Example: yarn add @khanacademy/perseus@PR795 |
Size Change: +174 B (0%) Total Size: 863 kB
ℹ️ View Unchanged
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #795 +/- ##
==========================================
+ Coverage 60.68% 61.93% +1.25%
==========================================
Files 483 485 +2
Lines 105876 105881 +5
Branches 6225 8920 +2695
==========================================
+ Hits 64249 65577 +1328
+ Misses 41627 40304 -1323
... and 34 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Could you add a unit test or two for this change? You should be able to use the tests in video.test.ts
as a guide and then assert with something like:
expect(document.getElementsByTagName("iframe")[0].src).toContain(
"dnt=1",
);
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.
LGTM!
if (url.indexOf("?") === -1) { | ||
url += "?dnt=1"; | ||
} else { | ||
url += "&dnt=1"; | ||
} |
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.
No action needed: I think this is fine to ship as-is, but there's also the URLSearchParams API now.
Summary:
Issue: https://khanacademy.atlassian.net/browse/INFRA-9620
Test plan: