Skip to content

Step 1 — Pre-flight Check

Before you touch any code, confirm three things: your customer ID, your consent setup, and whether your site uses a Content Security Policy.


Log in to your fraud0 Dashboard, select the tag you are implementing, and open Integrations → Tag Management. Copy the cid shown there. The cid is your tag’s unique ID — each tag has its own cid, so make sure you copy the one for the tag you are working on. Every code snippet in this guide uses this value wherever you see {{fraud0 cid}}.



Answer these three questions — they determine which embed path is right for you in the next step.

QuestionNotes
Q1Is there a Consent Management Platform (CMP) on the site?If no CMP, any embed path works. If yes, continue.
Q2Does the GTM container load before the CMP banner is interacted with?”Before” = the <script> for googletagmanager.com is in the <head> and runs unconditionally.
Q3Does your website enforce a Content Security Policy script-src directive?If yes, you will need to allow-list the fraud0 host (see 1.4 below).

Your answers determine which option to choose in Steps 2–3.


1.4 Content Security Policy — extend it if you have one

Section titled “1.4 Content Security Policy — extend it if you have one”

If your site sends a Content-Security-Policy header (or <meta http-equiv="Content-Security-Policy">) with a script-src directive, the fraud0 script will be blocked unless the host is allow-listed.

How to check: Open browser DevTools → Network tab → reload the page → inspect the document response headers. If you see a Content-Security-Policy header with a script-src directive that is not * or unsafe-inline-everything, you have one.

Add https://api.fraud0.com to your script-src:

script-src ... https://api.fraud0.com;

If you also have connect-src or img-src directives, allow the same host there:

connect-src ... https://api.fraud0.com;
img-src ... https://api.fraud0.com;

For more detail on CSP errors, see the FAQ article on Network Status “blocked: CSP”.


The fraud0 onsite tag sets two first-party cookies. If cookies are unavailable (e.g. blocked by the browser), the tag falls back to localStorage.

CookiePurposeLifetime
f0_uidIdentifies the user across sessions. Format: {UUID}.{timestamp}.365 days
f0_sidIdentifies the current session. Expires after 30 minutes of inactivity.1 day (max)

Both cookies are first-party, same-site, and do not contain personal data beyond a random identifier.


Once you have your cid and know your setup, continue to the next step.