How to Embed Your Privacy Notice Using an iFrame
Captain Compliance privacy notices are hosted pages by default. If you want the notice to appear directly within your website while still using the hosted content, you can embed it in an iframe.
This article explains how iframe embedding works, how to implement it, and the limitations to be aware of.
When to use an iframe
Embedding a privacy notice in an iframe may be appropriate when:
You want the notice to appear under your own domain.
You want to maintain a consistent navigation experience on your site.
You prefer not to redirect users to a standalone hosted page.
With an iframe, Captain Compliance still manages and updates the notice content automatically.
Embed the privacy notice
Each privacy notice has a unique hosted URL, which you place in an iframe on your site.
Copy the hosted URL of your privacy notice. In the app, it is under Configuration → Installation Script in the Privacy Policy container.
Paste that URL into the
srcattribute of the iframe.Add the iframe to the appropriate page or template on your site.
A basic example:
<iframe
src="https://privacy.cptn.co/privacy-policy/example-string"
title="Privacy Notice"
width="100%"
height="1200"
style="border:none;"
></iframe>Most organizations place the iframe on a dedicated Privacy Policy page. The title attribute describes the frame to screen readers.
If your site sends a Content Security Policy header, allow the notice’s origin in frame-src. See How to Configure a Content Security Policy (CSP) for Captain Compliance.
Sizing and formatting considerations
An iframe’s dimensions are set by your site, not by the embedded content.
The height must be large enough to display the full notice.
If the height is too small, visitors must scroll inside the iframe.
Fonts, spacing, and colors may not perfectly match your site.
Some responsive behavior may be limited, depending on how the iframe is sized.
For best results, use a flexible width (100%) and a height that accommodates long-form content.
Customization limitations
Site-level CSS does not apply to the embedded content.
Custom fonts and layout styles may differ from the rest of your site.
Deep visual customization is limited compared to native page rendering.
These limitations are inherent to iframe embedding.

