Add the script to the layout
npm install @pryntid/js---
// src/layouts/Base.astro (or any layout used by every page)
---
<html>
<head>…</head>
<body>
<slot />
<script>
import { reveal } from '@pryntid/js/reveal';
reveal({ publicKey: 'pk_live_YOUR_PUBLIC_KEY', website: 'example.com' });
</script>
</body>
</html>
<!-- View Transitions (<ClientRouter />): Astro keeps the page alive and changes the URL through
history.pushState, which Reveal already follows. Nothing else to do. -->Astro bundles the <script> and runs it in the browser only. Prefer the CDN snippet instead? Paste it inside <head> of the layout with is:inline so Astro leaves it untouched.
Notes
- With
<ClientRouter />(View Transitions) module scripts run once; later navigations arepushStatecalls and become pageviews. Without it every page is a full load, which is also fine. - Islands (React/Vue/Svelte components) do not need anything: identification is page-level.
Run the Test Script
- In the console go to Websites → your site → **Test Script**. It fetches your page from our side and runs the seven checks: snippet present, public key, website match, CSP
script-src, CSPconnect-src, consent manager, script position and www redirect. - Open your site with
?prynt_debug=1to see the live panel from the browser's point of view (consent, CMP, storage,cspBlocked, last send). - Visit two or three pages. The pulse in the console shows the last event within seconds; the first companies appear as soon as a business network visits.
A cspBlocked: true or a failed CSP check means your Content-Security-Policy needs the two lines from CSP and storage. Running a consent manager? Consent explains what is detected and what is sent before the visitor decides.
Last updated 2026-11-03 · Limits · Visitor opt-out