Content Security Policy (CSP) error in the console
Table of contents
What does Content Security Policy (CSP) mean?
Websites can set up a Content Security Policy (CSP) by either setting the HTTP response header Content-Security-Policy or by using a meta tag with the attribute http-equiv="Content-Security-Policy" in the HTML.
Instead of automatically trusting all content from the server, the CSP determines which sources are considered secure. The browser then only executes scripts, styles or other resources that originate from these trusted sources.
How to recognize the error
You need to update your CSP to use Varify.io if:
- You see an error like this in your browser console:- This page uses security features that are incompatible with the varify.io editor.
 
- You see an error like this in the Google Developer Tools:- Refused to execute editor.varify.io because it violates the following Content Security Policy directive...
 
- You see a mistake like this:- Content Security Policy of your site blocks the use of 'eval' in JavaScript.
 
How to fix the error
If your website uses a Content Security Policy (CSP), please enter the following values:
- https://app.varify.io 
- https://editor.varify.io 
- https://ip.varify.dev 
You also need the value unsafe-eval in the script-src directive.
For the Responsive Device Switcher to work, your domain must also be specified in the frame-ancestors and frame-src directives.
Example of a suitable CSP:
				
					Content-Security-Policy: frame-ancestors {YOUR_DOMAIN}; frame-src {YOUR_DOMAIN}; script-src 'unsafe-eval' https://app.varify.io https://editor.varify.io; connect-src https://ip.varify.dev 
				
			
		Note: The unsafe-eval entry is necessary so that user-defined JavaScript can be executed within variations.
					 First steps 
							
			
			
		
						
				
					
					 Tracking & web analytics integrations 
							
			
			
		
						
				- Tracking with Varify
- Manual Google Tag Manager tracking integration
- Automatic GA4 tracking integration
- Shopify Custom Pixel Integration via Google Tag Manager
- Shopify Tracking
- BigQuery
- PostHog evaluations
- Matomo - Integration via Matomo Tag Manager
- etracker integration
- Piwik Pro Integration
- Consent - Tracking via Consent
- Advanced Settings
- Tracking with Varify
- Manual Google Tag Manager tracking integration
- Automatic GA4 tracking integration
- Shopify Custom Pixel Integration via Google Tag Manager
- Shopify Tracking
- BigQuery
- PostHog evaluations
- Matomo - Integration via Matomo Tag Manager
- etracker integration
- Piwik Pro Integration
- Consent - Tracking via Consent
- Advanced Settings
					 Create experiment 
							
			
			
		
						
				
					 Targeting 
							
			
			
		
						
				
					
					 Reporting & evaluation 
							
			
			
		
						
				- GA4 reporting in Varify.io
- BigQuery
- Segment and filter reports
- Share report
- Audience-based evaluation in GA4
- Segment-based evaluation in GA 4
- PostHog Tracking
- Exporting the experiment results from Varify
- Matomo - Results analysis
- etracker evaluation
- Calculate significance
- User-defined click events
- Evaluate custom events in explorative reports
- GA4 - Cross-Domain Tracking
- GA4 reporting in Varify.io
- BigQuery
- Segment and filter reports
- Share report
- Audience-based evaluation in GA4
- Segment-based evaluation in GA 4
- PostHog Tracking
- Exporting the experiment results from Varify
- Matomo - Results analysis
- etracker evaluation
- Calculate significance
- User-defined click events
- Evaluate custom events in explorative reports
- GA4 - Cross-Domain Tracking
					 Visual editor 
							
			
			
		
						
				- Campaign Booster: Arrow Up
- Campaign Booster: Exit Intent Layer
- Campaign Booster: Information Bar
- Campaign Booster: Notification
- Campaign Booster: USP Bar
- Add Link Target
- Browse Mode
- Custom Selector Picker
- Edit Content
- Edit Text
- Move elements
- Hide Element
- Keyword Insertion
- Redirect & Split URL Testing
- Remove Element
- Replace Image
- Responsive Device Switcher
- Style & Layout Changes
- Campaign Booster: Arrow Up
- Campaign Booster: Exit Intent Layer
- Campaign Booster: Information Bar
- Campaign Booster: Notification
- Campaign Booster: USP Bar
- Add Link Target
- Browse Mode
- Custom Selector Picker
- Edit Content
- Edit Text
- Move elements
- Hide Element
- Keyword Insertion
- Redirect & Split URL Testing
- Remove Element
- Replace Image
- Responsive Device Switcher
- Style & Layout Changes