Auto Regime Detection Setup
Last updated: March 18, 20264 min readIntermediateBrandDeveloper
Auto regime detection uses the visitor's IP address to determine which privacy law applies and adjusts the consent banner behavior accordingly.
Supported Regimes
- GDPR (EU/EEA) — Opt-in consent model, all categories denied by default
- Saudi PDPL — Opt-in model with Arabic language default
- UAE PDPA — Opt-in model for UAE visitors
- GCC — General opt-in for other Gulf states
- CCPA (California) — Opt-out model, analytics and preferences enabled by default
- LGPD (Brazil) — Opt-in consent model
- PIPEDA (Canada) — Opt-in consent model
- None — No specific regulation detected, shows basic banner
Enable Auto Detection
1
Add the data attribute
Add data-auto-regime="true" to your script tag.
2
Ensure Cloudflare
Auto detection uses the CF-IPCountry header, so your site must be behind Cloudflare.
3
Test with VPN
Use a VPN to simulate different locations and verify the correct regime is applied.
Manual Override
javascript
<!-- Force a specific regime regardless of visitor location -->
<script src="https://cdn.arqam360.com/widget-v2.js"
data-key="YOUR_API_KEY"
data-regime="gdpr"></script>Auto regime detection requires Cloudflare's CF-IPCountry header. If your site is not behind Cloudflare, the regime will default to 'none'. You can use the data-regime attribute as a fallback.
Was this article helpful?