Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/zaraz/gotchas.md
1# Zaraz Gotchas23## Events Not Firing45**Check:**61. Tool enabled in dashboard (green dot)72. Trigger conditions met83. Consent granted for tool's purpose94. Tool credentials correct (GA4: `G-XXXXXXXXXX`, FB: numeric only)1011**Debug:**12```javascript13zaraz.debug = true;14console.log('Tools:', zaraz.tools);15console.log('Consent:', zaraz.consent.getAll());16```1718## Consent Issues1920**Modal not showing:**21```javascript22// Clear consent cookie23document.cookie = 'zaraz-consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';24location.reload();25```2627**Tools firing before consent:** Map tool to consent purpose with "Do not load until consent granted".2829## SPA Tracking3031**Route changes not tracked:**321. Configure History Change trigger in dashboard332. Hash routing (`#/path`) requires manual tracking:34```javascript35window.addEventListener('hashchange', () => {36zaraz.track('pageview', { page_path: location.pathname + location.hash });37});38```3940**React fix:**41```javascript42const location = useLocation();43useEffect(() => {44zaraz.track('pageview', { page_path: location.pathname });45}, [location]); // Include dependency46```4748## Performance4950**Slow page load:**51- Audit tool count (50+ degrades performance)52- Disable blocking triggers unless required53- Reduce event payload size (<100KB)5455## Tool-Specific Issues5657| Tool | Issue | Fix |58|------|-------|-----|59| GA4 | Events not in real-time | Wait 5-10 min, use DebugView |60| Facebook | Invalid Pixel ID | Use numeric only (no `fbpx_` prefix) |61| Google Ads | Conversions not attributed | Include `send_to: 'AW-XXX/LABEL'` |6263## Data Layer6465- Properties persist per page only - set on each page load66- Nested access: `{{client.__zarazTrack.user.plan}}`6768## Limits6970| Resource | Limit |71|----------|-------|72| Request size | 100KB |73| Consent purposes | 20 |74| API rate | 1000 req/sec |7576## When NOT to Use Zaraz7778- Server-to-server tracking (use Workers)79- Real-time bidirectional communication80- Binary data transmission81- Authentication flows82