Skip to main content
If your website sends a Content Security Policy (CSP), the browser blocks any script, request, or iframe from a host the policy doesn’t list. Add the Conversion hosts for each feature you use so the tracking script and forms keep working. You only need this page if your site already has a CSP. Without one, the browser allows Conversion’s hosts by default.

Set up your Content Security Policy

Before you begin

  • Access to wherever your site sets its CSP: the Content-Security-Policy response header on your web server, CDN, or hosting platform, or a <meta http-equiv="Content-Security-Policy"> tag in your page template.
  • The list of Conversion features you use on your website. See Directives by feature.

Steps

  1. Find each feature you use in Directives by feature.
  2. Add each listed host to the listed directive. Keep the values already in your policy, such as 'self'.
  3. If your policy has a script-src-elem directive, add the script-src hosts to it too. Browsers use script-src-elem instead of script-src for <script> tags when both are set.
  4. If your policy has no frame-src directive, add the frame-src hosts to child-src, or to default-src if child-src isn’t set either. Browsers fall back to those directives for iframes.
  5. Publish the updated policy.
  6. Open a page that uses Conversion in an incognito window, accept tracking if a cookie banner appears, and open your browser’s DevTools → Console.
  7. Confirm there are no Refused to load, Refused to connect, or Refused to frame errors that mention a host from this page.

Directives by feature

Tracking script

The tracking script loads from p.conversion.ai and sends page visits back to it.

Embedded Conversion forms

An embedded Conversion form is an iframe from forms.conversion.ai, plus the Forms SDK script that resizes it and passes it the visitor’s tracking context. The form submits from inside its iframe, so your page doesn’t need connect-src for it. Everything the form loads inside the iframe, such as its fonts and reCAPTCHA, is covered by Conversion’s own policy on forms.conversion.ai, not by yours. Conversion’s policy also lets the form display only on pages on your business’s registered base domain. On any other domain, such as a staging site, the browser reports a Refused to frame error that mentions frame-ancestors. Your policy doesn’t cause it, and changing your policy won’t fix it. Turn on Allow any origin for testing in the form’s General settings instead.

Forms submitted with the Forms SDK

When your own code submits a form with ConversionFormsV1.submit(), the Forms SDK sends the submission to forms.conversion.ai from your page.

Tracked forms

For a tracked form, the Forms SDK listens for submissions on your page and sends them to p.conversion.ai.

Public files

Add this only if you show a public file on your website, such as an image or a video, from Conversion’s default domain. If you serve files from your own domain, add that origin instead, for example https://assets.yourcompany.com.

Inline scripts in form snippets

The programmatic submit snippet and the set-values snippet in a form’s settings are inline <script> blocks. If your policy doesn’t allow inline scripts, move that code into a JavaScript file on your site, or allow the block with a nonce or hash in script-src. The embed snippet has no inline script.

Full policy for all features

These are the directives for the tracking script and every kind of Conversion form, combined. Merge them into your existing policy rather than replacing it:
Add script-src-elem only if your policy already uses it. If you show public files from Conversion’s default domain, also add https://conversion-files.com to img-src and media-src.

Features that don’t need CSP changes