Setting the file. One moment.
Chapter 04 · Cloudflare Deploy
Subchapter 4.304
references/zaraz/gotchas.mdMarkdown2 KBView on GitHub
Check:
G-XXXXXXXXXX, FB: numeric only)Debug:
zaraz.debug = true;
console.log('Tools:', zaraz.tools);
console.log('Consent:', zaraz.consent.getAll());Modal not showing:
// Clear consent cookie
document.cookie = 'zaraz-consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
location.reload();Tools firing before consent: Map tool to consent purpose with “Do not load until consent granted”.
Route changes not tracked:
#/path) requires manual tracking:window.addEventListener('hashchange', () => {
zaraz.track('pageview', { page_path: location.pathname + location.hash });
});React fix:
const location = useLocation();
useEffect(() => {
zaraz.track('pageview', { page_path: location.pathname });
}, [location]); // Include dependencySlow page load:
| Tool | Issue | Fix |
|---|---|---|
| GA4 | Events not in real-time | Wait 5-10 min, use DebugView |
| Invalid Pixel ID | Use numeric only (no fbpx_ prefix) | |
| Google Ads | Conversions not attributed | Include send_to: 'AW-XXX/LABEL' |
{{client.__zarazTrack.user.plan}}| Resource | Limit |
|---|---|
| Request size | 100KB |
| Consent purposes | 20 |
| API rate | 1000 req/sec |