{"id":21931725,"url":"https://github.com/lekoala/silverstripe-cookieconsent","last_synced_at":"2025-04-19T19:18:57.035Z","repository":{"id":62516749,"uuid":"337029836","full_name":"lekoala/silverstripe-cookieconsent","owner":"lekoala","description":"Integrate cookieconsent.com in SilverStripe","archived":false,"fork":false,"pushed_at":"2023-08-15T10:54:32.000Z","size":94,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-27T21:20:00.442Z","etag":null,"topics":["cookieconsent","silverstripe"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lekoala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"lekoala"}},"created_at":"2021-02-08T09:55:34.000Z","updated_at":"2023-08-15T10:54:36.000Z","dependencies_parsed_at":"2022-11-02T13:45:23.079Z","dependency_job_id":null,"html_url":"https://github.com/lekoala/silverstripe-cookieconsent","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-cookieconsent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-cookieconsent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-cookieconsent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lekoala%2Fsilverstripe-cookieconsent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lekoala","download_url":"https://codeload.github.com/lekoala/silverstripe-cookieconsent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226814853,"owners_count":17686370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookieconsent","silverstripe"],"created_at":"2024-11-28T23:14:50.125Z","updated_at":"2024-11-28T23:14:50.767Z","avatar_url":"https://github.com/lekoala.png","language":"PHP","funding_links":["https://github.com/sponsors/lekoala"],"categories":[],"sub_categories":[],"readme":"# SilverStripe CookieConsent module\n\n[![Build Status](https://travis-ci.com/lekoala/silverstripe-cookieconsent.svg?branch=master)](https://travis-ci.com/lekoala/silverstripe-cookieconsent/)\n[![scrutinizer](https://scrutinizer-ci.com/g/lekoala/silverstripe-cookieconsent/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lekoala/silverstripe-cookieconsent/)\n[![Code coverage](https://codecov.io/gh/lekoala/silverstripe-cookieconsent/branch/master/graph/badge.svg)](https://codecov.io/gh/lekoala/silverstripe-cookieconsent)\n\n## Intro\n\nYet another cookie consent module. This one integrates https://www.cookieconsent.com/ which allow you to have various layouts (including blocking layouts) and\nload/allow cookies per type.\n\nNOTE: even if it has the same name (and the same version number!!), it is NOT the cookieconsent from https://www.osano.com/cookieconsent\n\n## How it works\n\nWhen you require your scripts, you should add their type in order to load them according to user preference:\n\nThe four types are :\n- strictly-necessary\n- functionality\n- tracking\n- targeting\n\nAnd they will be rendered in something like this. Please note the `text/plain` type that prevents the script for being executed.\nThis is what you should do if you include your scripts manually.\n\n```html\n\u003cscript type=\"text/plain\" cookie-consent=\"strictly-necessary\" src=\"strict.js\"\u003e\n\u003cscript type=\"text/plain\" cookie-consent=\"functionality\" src=\"functional.js\"\u003e\n\u003cscript type=\"text/plain\" cookie-consent=\"tracking\" src=\"tracking-performance.js\"\u003e\n\u003cscript type=\"text/plain\" cookie-consent=\"targeting\" src=\"targeting-advertising.js\"\u003e\n```\n\nor for inline scripts\n\n```html\n\u003cscript type=\"text/plain\" cookie-consent=\"tracking\"\u003e\nconsole.log(\"i'm a tracking script\");\n\u003c/script\u003e\n```\n\nIf you use the Requirements api, in order to specify this extra attribute,\nyou need a `Requirements_Backend` that supports it.\nThis is delegated to my [defer backend module](https://github.com/lekoala/silverstripe-defer-backend).\n\nThis is how you would add a tracking script with the updated requirements api\n\n```php\nRequirements::javascript('myscript',['cookieconsent' =\u003e 'tracking'])\n```\n\n## For php cookies\n\nIf you set cookies on the serverside, you can check the `CookieConsent::isAllowed` method or use the\n`CookieConsent::setCookie` helper.\n\n## Options\n\n```yml\nLeKoala\\CookieConsent\\CookieConsent:\n  # use local js or cdn js\n  use_cdn: false\n  # class name of your privacy page. leave blank for default\n  privacy_notice_class: 'PrivacyNoticePage'\n  opts:\n    # simple, headline, interstitial, standalone\n    notice_banner_type: \"interstitial\"\n    # implied, express =\u003e should really by express for GDPR\n    consent_type: \"express\"\n    # light, dark\n    palette: \"dark\"\n    change_preferences_selector: \"#cookieconsent-preferences\"\n```\n\n## Check compliance\n\nYou can use cookiebot the check compliance https://www.cookiebot.com/en/gdpr-cookies/\n\nThis can also helps customers to realize the necessity of this module\n\n## Compatibility\n\nTested with 4.6 but should work on any ^4 projects\n\n## Maintainer\n\nLeKoala - thomas@lekoala.be\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flekoala%2Fsilverstripe-cookieconsent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flekoala%2Fsilverstripe-cookieconsent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flekoala%2Fsilverstripe-cookieconsent/lists"}