-
Notifications
You must be signed in to change notification settings - Fork 0
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
DOC-4329: Ketch footer and Segment updates #179
base: main
Are you sure you want to change the base?
Conversation
UI bundle preview build successful! ✅ |
Build successful! ✅ |
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.
Looks good!
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
src/js/05-feedback-dialog.js
Outdated
@@ -43,6 +43,16 @@ | |||
if (message && window.analytics) { | |||
window.analytics.track('Feedback Form', { | |||
message, | |||
consent: { | |||
categoryPreferences: { |
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 noticed in the segment docs this consent
object uses boolean values instead of strings. I think This values should be based on the ketch preferences
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.
Thanks @EladioGaldamez! I copied some of your PR and created a global scope track event that includes the correct consent context gathered from what the user selects in the Ketch popup
UI bundle preview build successful! ✅ |
Build successful! ✅ |
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!
Just a heads up, we don't see the consent preferences in the Segment context. I'm checking if this is the correct way to send them (Based on the docs, yes but we need to review this)
UI bundle preview build successful! ✅ |
Build successful! ✅ |
Build successful! ✅ |
src/partials/head-scripts.hbs
Outdated
saveConsent(consent); | ||
// Only load Segment analytics if the user has consented to analytics | ||
if (consent?.purposes?.analytics && window.analytics) { | ||
window.analytics.load("{{../site.keys.segment}}"); |
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.
can we also add the following script:
window.analytics.addSourceMiddleware(({ payload, next }) => {
if (window.ketchConsent) {
payload.obj.context.consent = {
categoryPreferences: window.ketchConsent?.purposes,
};
}
next(payload);
});
This will enable the context on all the events and not only track events.
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.
Oh nice! Will do
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build failure! ❌
|
Build failure! ❌
|
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
UI bundle preview build successful! ✅ |
Build successful! ✅ |
Jira: DOC-4329
This PR is meant to update the footer with a "Do Not Sell My Info" link to the Ketch preference management interface hosted on www.datastax.com/preferences (not yet launched).
TO DO: Update Segment track calls with new consent categories.