Create a free pilot
Your pilot produces the site key used by every integration path.
Create a free pilotInstall before optional code
Serve pact.js from the same first-party origin and place this exact bootstrap at the start of head.
html
<script
id="pact-bootstrap"
data-tenant="site_live_your_key"
data-src="/pact.js"
data-api="/v1">
((e,r,o)=>{let a=location.search,c=(a.match(/region=(CA|TX|EU)/)||[,"CA"])[1],n=r.currentScript.dataset,t="1"==n.gpc||o.globalPrivacyControl||a.includes("gpc=1"),i=!t&&"EU"!=c&&"0"!=n.allow,l=n.src||"/pact.js",p=()=>import(l);(e.pact={ready:0,purposes:{marketing:i},gpc:!!t,region:c,on:()=>()=>0,allow:p,deny:p,openPreferences:p}).ready="TX"==c?Promise.resolve():p()})(window,document,navigator);
</script>Gate optional behavior
Use a native element, the React adapter, or pactClient. They all read the same decision.
html
<pact-gate purpose="analytics">
<analytics-dashboard></analytics-dashboard>
</pact-gate>
<pact-preferences-button>
Privacy choices
</pact-preferences-button>Verify production
Open the site in each supported regional path, exercise GPC and withdrawal, then use the Pact console to confirm the hostname and runtime version.
- Bootstrap precedes every optional tag
- GPC and stored rejection block before execution
- Quiet path makes zero initial core requests
- Purpose gates react to approval and withdrawal
- Runtime hostname and version match
- CLS remains 0.00 and Pact is never LCP