Skip to main content
All CollectionsAd Fraud ProtectionImplementation Guide
Whitelisting Spider AF in Your Website's CSP
Whitelisting Spider AF in Your Website's CSP

This article explains how to whitelist Spider AF, on your website's Content Security Policy (CSP) to allow us to analyze clicks and identify potential ad fraud.

Itzayana Rodríguez avatar
Written by Itzayana Rodríguez
Updated this week

What is a Content Security Policy (CSP)?

CSP is a security feature implemented on websites that helps mitigate certain security risks. It is a white list used to control which resources, particularly JavaScript, a webpage can load. This helps prevent malicious scripts from being injected into your website and causing damage. This is especially useful in defending against Cross-Site Scripting (XSS) attacks, where attackers inject malicious code into a legitimate website through third-party scripts.

Why do I need to whitelist sp-trk.com?

Our anti-ad fraud solution relies on data collected from your website to analyze clicks and identify fraudulent activity. By whitelisting sp-trk.com in your website's CSP, you allow our scripts to load and function properly, enabling us to receive the necessary click data for analysis.

How to whitelist sp-trk.com

The exact steps to whitelist sp-trk.com will depend on your website's specific setup. However, you'll typically need to modify a setting called the Content Security Policy (CSP). This setting controls which websites your website can interact with.

The general approach involves adding sp-trk.com to the allowed domains within the connect-src and script-src directives of your CSP.

Here's an example of a modified CSP header that whitelists sp-trk.com:

Content-Security-Policy: connect-src 'self' ... sp-trk.com; script-src 'self' ... sp-trk.com;

Important Note: This is a basic example. You may have additional directives and domains specified in your existing CSP. Make sure to consult your website's documentation or developer for specific instructions on modifying your CSP configuration.

Getting Help

If you're unsure about modifying your website's CSP or require further assistance, please don't hesitate to contact our support team. We'll be happy to guide you through the process.

By whitelisting sp-trk.com, you'll enable our click fraud analysis service to function effectively and help protect your website from fraudulent activity.

Did this answer your question?