TL;DR: Add https://admaxxer.com (and your proxy domain, if any) to both the script-src and connect-src directives in your Content Security Policy. If your CSP is currently unset or uses *, you do not need to change anything.
Many frameworks (Next.js, Rails, Laravel, Shopify, WordPress security plugins) now ship with a locked-down default CSP. When the Admaxxer pixel tries to load /js/script.js from https://admaxxer.com, the browser quietly refuses and logs an error like:
Refused to load the script 'https://admaxxer.com/js/script.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".
When /api/event calls are blocked, you will see:
Refused to connect to 'https://admaxxer.com/api/event' because it violates the Content Security Policy directive: "connect-src 'self'".
script.js or event. Blocked requests show as (blocked:csp).If you see these, CSP is the cause. Continue below.
CSP can be set in three places (strongest to weakest, in evaluation order):
Content-Security-Policy: ... — set in your web server (NGINX / Apache / Cloudflare) or framework middleware.<meta http-equiv="Content-Security-Policy" content="..."> tag in HTML.next.config.js headers(), Rails config/initializers/content_security_policy.rb, Laravel Spatie\Csp.Check the response headers for any page: curl -I https://yourdomain.com/ | grep -i content-security.
You need to add https://admaxxer.com to two directives:
/js/script.js./api/event.Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; connect-src 'self';
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://admaxxer.com; connect-src 'self' https://admaxxer.com;
If you proxy the pixel through your own domain (recommended), you only need 'self' — no third-party entry required. See our NGINX proxy guide and Cloudflare proxy guide.
next.config.js)module.exports = {
async headers() {
return [{
source: '/(.*)',
headers: [{
key: 'Content-Security-Policy',
value: "default-src 'self'; script-src 'self' 'unsafe-inline' https://admaxxer.com; connect-src 'self' https://admaxxer.com;",
}],
}];
},
};
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://admaxxer.com; connect-src 'self' https://admaxxer.com;" always;
.htaccess)Header set Content-Security-Policy "default-src 'self'; script-src 'self' https://admaxxer.com; connect-src 'self' https://admaxxer.com;"
config/initializers/content_security_policy.rb)Rails.application.config.content_security_policy do |policy|
policy.script_src :self, 'https://admaxxer.com'
policy.connect_src :self, 'https://admaxxer.com'
end
In Wordfence / Shield Security / Really Simple SSL, open the CSP editor and add https://admaxxer.com to both the Allowed scripts and Allowed AJAX endpoints lists. Save and hard-reload.
<meta> tag AND header. Both apply. Check your HTML source (not DevTools — the rendered DOM) for a meta http-equiv.Content-Security-Policy-Report-Only logs but does not enforce — if both are set, verify the enforcing one.Duplicate payment events · Proxy via NGINX · Proxy via Cloudflare · Pixel API Overview