PactDOCS

UNDERSTAND / GPC

Global Privacy Control

Pact reads the production browser and request signals before marketing code can load.
01

Signals Pact honors

  • navigator.globalPrivacyControl in the inline bootstrap
  • Sec-GPC: 1 forwarded by the server document
  • Stored GPC state that remains restrictive across visits
  • A query override only on reference and testing routes
02

Restrictions

PurposeUnder GPC
marketingDenied
ai.trainingDenied
data.exportDenied
03

Test the path

gpc.spec.ts
typescript
test('GPC blocks marketing before execution', async ({ page }) => {
  await page.addInitScript(() => {
    Object.defineProperty(navigator, 'globalPrivacyControl', { value: true })
  })
  await page.goto('/')
  await page.evaluate(() => window.pact.ready)
  expect(await page.evaluate(() => window.pact.purposes.marketing)).toBe(false)
})
NEXTBuild the browser acceptance suite