Skip to content
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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

eric-schneider
Copy link
Contributor

@eric-schneider eric-schneider commented Jan 9, 2025

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.

@mlr
Copy link
Contributor

mlr commented Jan 9, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 9, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

Copy link
Collaborator

@colegoldsmith colegoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mlr
Copy link
Contributor

mlr commented Jan 9, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 9, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 9, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 9, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 9, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 9, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 9, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 9, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@@ -43,6 +43,16 @@
if (message && window.analytics) {
window.analytics.track('Feedback Form', {
message,
consent: {
categoryPreferences: {

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

Copy link
Collaborator

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

src/partials/head-prelude.hbs Outdated Show resolved Hide resolved
@mlr
Copy link
Contributor

mlr commented Jan 16, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 16, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

Copy link

@EladioGaldamez EladioGaldamez left a 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)

@mlr
Copy link
Contributor

mlr commented Jan 16, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 16, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 16, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

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}}");
Copy link

@EladioGaldamez EladioGaldamez Jan 16, 2025

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Will do

@mlr
Copy link
Contributor

mlr commented Jan 16, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 16, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 16, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 16, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 17, 2025

UI bundle preview build failure! ❌

[20:59:29] Using gulpfile ~/work/docs-ui/docs-ui/gulpfile.js [20:59:29] Starting 'preview:build'... [20:59:29] Starting 'build'... Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme [20:59:32] Finished 'build' after 2.67 s [20:59:32] Starting 'preview:build-pages'... [20:59:32] Finished 'preview:build-pages' after 100 ms [20:59:32] Finished 'preview:build' after 2.77 s node:events:497 throw er; // Unhandled 'error' event ^ <ref *1> Error: #with requires exactly one argument in UI template src/partials/head-scripts.hbs at Object. (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js:17:13) at Object.wrapper (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19) at Object.eval [as main] (eval at createFunctionContext (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), :12:49) at main (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32) at Object.ret (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12) at Object.ret [as head-scripts] (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:519:21) at Object.invokePartialWrapper [as invokePartial] (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/runtime.js:88:46) at Object.eval [as main] (eval at createFunctionContext (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), :18:28) at main (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32) at Object.ret (/home/runner/work/docs-ui/docs-ui/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12) Emitted 'error' event on Domain instance at: at Transform.emit (node:domain:539:12) at Transform.onerror (/home/runner/work/docs-ui/docs-ui/node_modules/readable-stream/lib/_stream_readable.js:640:52) at Transform.emit (node:events:519:28) at Transform.emit (node:domain:488:12) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { domainEmitter: Transform { _events: { close: undefined, error: undefined, prefinish: [Function: prefinish], finish: undefined, drain: undefined, data: [Function: ondata], end: [Function: bound onceWrapper] { listener: [Function: onend] }, readable: undefined, unpipe: undefined }, _readableState: ReadableState { highWaterMark: 16, buffer: [], bufferIndex: 0, length: 0, pipes: [ Pumpify { _readableState: ReadableState { objectMode: true, highWaterMark: 16, buffer: [BufferList], length: 0, pipes: [Transform], pipesCount: 1, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, _events: [Object: null prototype] { end: [Array], close: [Array], prefinish: [Function (anonymous)], newListener: [Function: removeSink], removeListener: [Array], unpipe: [Function: onunpipe], error: [Array], finish: [Function], data: [Function: ondata] }, _eventsCount: 9, _maxListeners: undefined, _writableState: WritableState { objectMode: true, highWaterMark: 16, finalCalled: false, needDrain: false, ending: false, ended: false, finished: false, destroyed: false, decodeStrings: true, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: true, bufferProcessing: false, onwrite: [Function (anonymous)], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: false, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: [CorkedRequest] }, writable: true, allowHalfOpen: true, _writable: DestroyableTransform { _readableState: [ReadableState], readable: true, _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: true, allowHalfOpen: true, _transformState: [Object], _destroyed: false, _transform: [Function: normalize], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, _readable: DestroyableTransform { _readableState: [ReadableState], readable: true, _events: [Object: null prototype], _eventsCount: 8, _maxListeners: undefined, _writableState: [WritableState], writable: true, allowHalfOpen: true, _transformState: [Object], _destroyed: false, _transform: [Function: writeFile], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, _readable2: DestroyableTransform { _readableState: [ReadableState], readable: true, _events: [Object: null prototype], _eventsCount: 8, _maxListeners: undefined, _writableState: [WritableState], writable: true, allowHalfOpen: true, _transformState: [Object], _destroyed: false, _transform: [Function: writeFile], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, _autoDestroy: false, _forwardDestroy: false, _forwardEnd: true, _corked: 0, _ondrain: null, _drained: true, _forwarding: false, _unwrite: [Function: clear], _unread: [Function: clear], _ended: false, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false } ], awaitDrainWriters: null, [Symbol(kState)]: 193997247, [Symbol(kErroredValue)]: [Circular *1] }, _writableState: WritableState { highWaterMark: 16, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0, [Symbol(kState)]: 17580479, [Symbol(kBufferedValue)]: null, [Symbol(kErroredValue)]: [Circular *1] }, allowHalfOpen: true, _maxListeners: undefined, _transform: [Function (anonymous)], _eventsCount: 3, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kCallback)]: null }, domainThrown: false } Node.js v21.6.1

@plpesvc-ds
Copy link

Build failure! ❌

{"level":"fatal","time":1737147653159,"name":"antora","err":{"type":"Error","stack":"Error\n at Object. (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js:17:13)\n at Object.wrapper (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)\n at Object.eval [as main] (eval at createFunctionContext (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), :12:49)\n at main (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32)\n at Object.ret (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12)\n at Object.ret [as head-scripts] (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:519:21)\n at Object.invokePartialWrapper [as invokePartial] (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/runtime.js:88:46)\n at Object.eval [as main] (eval at createFunctionContext (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), :18:28)\n at main (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32)\n at Object.ret (/home/runner/work/datastax-docs-site/datastax-docs-site/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12)"},"msg":"#with requires exactly one argument in UI template partials/head-scripts.hbs"}

@mlr
Copy link
Contributor

mlr commented Jan 21, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 21, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 24, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 24, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 24, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 24, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 24, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 24, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 24, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 24, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

@mlr
Copy link
Contributor

mlr commented Jan 24, 2025

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@plpesvc-ds
Copy link

plpesvc-ds commented Jan 24, 2025

Build successful! ✅
Deploying draft.
Deploy successful! View draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants