Affilimate
  • Home
  • Features  
  • Integrations
  • Pricing
  • Demo

Fix a content security policy (CSP) error

If you have properly installed the tracking snippet and imported all of your affiliate links, but still aren't seeing any click data being reported, this might be caused by your content security policy.

To fix this, you'll need to adjust both your script-src and connect-src directives.

How to check for content security policy errors

Visit your website, open Chrome Dev Tools, click the Console tab, and check for any of these console errors or similar messages.

If you see a message like this:

Refused to load script 'blob:https://yourwebsite.com/daffbd4b-d39a-457a-8ebc-53aef63f877d' because it violates the following Content Security Policy directive [...]

Our script loads a second script as a blob, depending on the user's browser features and whether we need to polyfill certain browser functions. In this case, you will need to adjust your CSP's script-src directive:

script-src 'unsafe-inline' 'unsafe-eval' blob: https://www.yourwebsite.com https://*.affilimate.io

Then our script and its secondary script will load in just fine, and then you should be able to see clicks starting to be tracked in Affilimate going forward.

If you see a message like this:

Refused to connect to 'https://snippet.affilimate.io/affilimate-sm.js?v=395610b10' because it violates the following Content Security Policy directive [...]

You may need to add both our snippet subdomain snippet.affilimate.io to connect-src directive, and also our reporting endpoints which all have the hostname: us-central1-affilimate.cloudfunctions.net.

connect-src https://*.affilimate.io  https://us-central1-affilimate.cloudfunctions.net

Have questions? Contact us at support@affilimate.com anytime.

Last Updated 7/15/2022

Try the affiliate analytics platform for content websites

Affilimate aggregates all your affiliate commissions in one place, and then adds the missing attribution data you need to maximize your affiliate revenue from every post you publish.

Create your dashboard   Get a demo

 Free 15-day trial   No credit card required


Affilimate Analytics App
Affilimate
Newsletter
Monica

Hey, I'm Monica.

I'm the co-founder of Affilimate.

Once per month, I send insider tips and strategies for affiliates in this newsletter.

It's short, practical, and original. Try it out:

No spam, unsubscribe anytime.

AffilimateBy Adaero Software