Embed on Your Website
The embed script places a live, self-updating policy directly on your website. When you regenerate or edit a policy in your dashboard, the embedded version updates automatically — no code changes needed on your site.
Embed a policy on a page
Copy your pre-filled snippet from Dashboard → Integrations (your site key is generated for you) and paste it into the page where the policy should appear:
<script src="https://policifyai.com/embed.js" data-site-key="YOUR_SITE_KEY" async> </script>
The script detects which policy to show from the page URL (/privacy-policy, /terms, /refund-policy, …) and renders it right where the tag sits. On a page whose URL doesn't identify the policy, add data-policy with the policy type:
<script src="https://policifyai.com/embed.js" data-site-key="YOUR_SITE_KEY" data-policy="privacy-policy" async> </script>
Legal hub (all policies)
The hub mode lists all your policies with navigable links — ideal for a dedicated /legal page on your site. Paste the snippet on a page whose URL contains /legal, or force it with data-policy="hub":
<script src="https://policifyai.com/embed.js" data-site-key="YOUR_SITE_KEY" data-policy="hub" async> </script>
Find your site key in Dashboard → Integrations (agencies: Agency → API & Webhooks).
Script attributes reference
| Attribute | Required | Description |
|---|---|---|
| data-site-key | Yes | Your site key from Dashboard → Integrations (pk_…) |
| data-policy | Optional | Force a policy type (e.g. "privacy-policy", "terms-of-service") or "hub". Auto-detected from the page URL otherwise |
| data-container | Optional | ID of an existing element to render into. Defaults to rendering where the script tag sits |
| data-theme | Optional | "light" | "dark" | "auto" (default: "auto", follows OS) |
Platform-specific guides
WordPress
In the WordPress block editor, add an HTML block and paste the embed code. For a dedicated legal page, create a new Page, switch the editor to Code mode, and paste the snippet. See the full WordPress guide.
Shopify
Go to Online Store → Pages, create a new page, click the source icon (<>) to switch to HTML mode, and paste the embed. See the full Shopify guide.
Webflow
Add an Embed element from the Add panel, or go to Project Settings → Custom Code → Before </body> for site-wide loading. See the full Webflow guide.
Other platforms (Wix, Squarespace, Framer)
Any platform that supports custom HTML or code embed blocks can host the script. Look for “Custom code”, “HTML widget”, or “Embed block” in your platform's settings.
Troubleshooting
Policy not appearing
Check that (1) the data-site-key matches the one in Dashboard → Integrations, (2) the page URL identifies the policy or you set data-policy, and (3) your site's Content Security Policy (CSP) allows scripts from policifyai.com. The browser console logs a [PolicifyAI] warning when something is off.
Policy not updating after regeneration
The embed fetches the latest version on each page load. If you see an old version, clear your browser cache or try an incognito window. CDN caches may take up to 5 minutes to propagate.