Repository navigation
consent: the container's cookie banner, served from here, in place of ours - #156
Merged
Merged
Conversation
… ours The banner is vanilla-cookieconsent 3.3.0 (MIT), copied from npm into public/cookieconsent.* and served from this site, so the CSP needs no other address. public/consent.js, the same file on spinbox.dev, docs. and blog., carries the settings the GTM-N6G9KXJ7 container's own banner had (cc_cookie on spinbox.dev for 182 days, the texts, equal-weight buttons) without the marketing category, since nothing here shows ads. Tag Manager now loads on every page with every kind of storage denied; accepting Analytics grants analytics_storage and pushes cc_consent_update, as the container's banner did, and rejecting it later deletes the _ga cookies. Cookie preferences in the footer is an <a data-cc="show-preferencesModal"> the library opens. Off *.spinbox.dev it does nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
GTM-N6G9KXJ7container's cookie banner, served from this site instead of jsDelivr, in place of our own. The same change is in the blog, docs and spinbox.dev.public/cookieconsent.*and served from'self', so the CSP needs no new address.public/consent.js: the same file on all three sites, with the container's settings:cc_cookieonspinbox.devfor 182 days, the texts, equal-weight buttons. Marketing is left out because nothing here shows ads. It does nothing off*.spinbox.dev.analytics_storageand pushescc_consent_update, as the container's banner did. Rejecting it later deletes the_gacookies.<a data-cc="show-preferencesModal">; the library opens it.cc--darkmodeunlessdata-theme="light").Tested locally on a copy with the domain check and
hideFromBotsoff, so a headless browser could see it. The banner shows; Accept all pushes the consent update and the event and writescc_cookie; the footer link opens the preferences.Still needed in the container: stop the banner's Custom HTML tag from firing on these sites (the CSP blocks it anyway, with an error in the console), and fix
doc.spinbox.devtodocs.spinbox.devin the hostname map.🤖 Generated with Claude Code