05-12-2025 05:06 PM - edited 05-12-2025 05:14 PM
To make sure the Invoca Tag can run properly without being blocked by a Content Security Policy (CSP), you need to modify the CSP configurations for your website. This involves adjusting the ‘Content-Security-Policy’ HTTP header for your web server, or the ‘<meta>’ tag in your webpage’s HTML. The modification needs to include the location with the JS Library and JS Tag, and the Invoca endpoint that the Tag needs to connect to for collecting attribution and swapping phone numbers.
The CSP uses directives to define what sources of content are allowed. The directives we are concerned with are:
Each directive can have multiple sources, separated by white spaces. For example:
None
connect-src mysource.example.com mysource2.example.com mysource3.example.com ...;
For the US:
For the EU:
For US networks:
None
Content-Security-Policy: script-src 'self' solutions.invocacdn.com pnapi.invoca.net; connect-src 'self' pnapi.invoca.net;
For EU networks:
None
Content-Security-Policy: script-src 'self' solutions.eu.invocacdn.com pnapi.eu.invoca.net; connect-src 'self' pnapi.eu.invoca.net;
The most common way to implement CSP is by setting the `Content-Security-Policy` HTTP header on your web server:
You can also use a `<meta>` tag in your HTML:
connect-src
None
<meta http-equiv="Content-Security-Policy" content="script-src 'self' solutions.invocacdn.com pnapi.invoca.net; connect-src 'self' pnapi.invoca.net;">