Skip to content

Conversation

@bsanchez-the-roach
Copy link
Contributor

@bsanchez-the-roach bsanchez-the-roach commented Nov 20, 2025

This one-line change should disable the cookie consent pop-up in non-production environments, including both local builds and deploy previews. Previously, in both environments, the pop-up would re-appear at every page load.

Two things:

  1. This uses the conditional if (window.location.hostname == 'cockroachlabs.com') which feels... not ideal? Claude Code also recommended if (jekyll.environment == 'production') but I'm not familiar with that and I thought I'd get some visibility on this, rather than make that decision myself.
  2. I don't know that there's a good way to test this before it goes to production, given that we desire different behavior in the deploy preview and in production. Any ideas?

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 88f25b2
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/692081eb3af93600089d179d

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 88f25b2
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/692081eb8e60fd00083c6dfc

@github-actions
Copy link

Files changed:

  • src/current/_includes/google_tag_manager.html

@netlify
Copy link

netlify bot commented Nov 20, 2025

Netlify Preview

Name Link
🔨 Latest commit 88f25b2
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/692081eba100190008d9cebb
😎 Deploy Preview https://deploy-preview-21242--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@florence-crl florence-crl self-requested a review November 20, 2025 20:39
Copy link
Contributor

@florence-crl florence-crl left a comment

Choose a reason for hiding this comment

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

lgtm

@kikiya
Copy link

kikiya commented Nov 20, 2025

We have an env var JEKYLL_ENV that we can use to disable it. If that value is not production you can disable the consent banner. That should cover all non-production use cases. Can you test this out? @bsanchez-the-roach

@bsanchez-the-roach bsanchez-the-roach marked this pull request as ready for review November 20, 2025 21:28
@kikiya
Copy link

kikiya commented Nov 20, 2025

Looks good!

@bsanchez-the-roach bsanchez-the-roach merged commit af85aec into main Nov 21, 2025
5 checks passed
@bsanchez-the-roach bsanchez-the-roach deleted the cookie-cutter branch November 21, 2025 15:28
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.

3 participants