How to Embed Your Privacy Notice Using an iFrame
Captain Compliance privacy notices are hosted pages by default. In some cases, you may want the notice to appear directly within your website while still using the hosted content. This can be accomplished by embedding the notice using an iFrame.
This article explains how iframe embedding works, how to implement it, and important limitations to be aware of.
When to Use an iFrame
Embedding a privacy notice using 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
Using an iFrame still allows Captain Compliance to manage and update the notice content automatically.
How to Embed the Privacy Notice
Each privacy notice has a unique hosted URL. This URL can be embedded directly into an iFrame on your site.
A basic example:
<iframe
src="https://privacy.cptn.co/privacy-policy/example-string"
width="100%"
height="1200"
style="border:none;"
></iframe>To embed your notice:
Copy the hosted URL of your privacy notice
Paste that URL into the
srcattribute of the iFrameAdd the iFrame to the appropriate page or template on your site
Most clients place the iFrame on a dedicated Privacy Policy page.
Sizing and Formatting Considerations
iFrames have fixed dimensions defined by your site, not by the embedded content.
Important considerations:
The height of the iFrame must be large enough to display the full notice
If the height is too small, scrolling may be required inside the iFrame
Styling such as 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
When embedding a notice via iFrame:
Site-level CSS will 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-based embedding and should be expected.
