Install
One script and a config file. Fill your own Companies House values before any public publish. Do not invent them.
1. Config
Copy config.example.json from the pecrpage repo to
config.json on your site. Set registered name, company number, place of
registration, registered office, and contact email from your own records. Leave analytics
disabled unless you have a measurement ID and will only load it after Accept.
2. Self-host (recommended)
Put js/banner.js and config.json in your Cloudflare Pages output
directory, then add before </body>:
<script src="/js/banner.js" defer data-config="/config.json"></script>
3. Remote script
Load the banner from pecrpage and keep config.json on your own origin
(data-config is fetched same-origin):
<script
src="https://pecrpage.pages.dev/js/banner.js"
defer
data-config="/config.json"
></script>
4. Check
- Banner shows Reject and Accept with equal weight.
- Reject does not block the page.
- Footer shows your company disclosures once config is filled.
- Privacy and Terms routes exist on your site (or update paths in config).
For background on PECR and website disclosures, see the PECR guide. Try the demo on this origin first.