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/README.md
1# Cloudflare Zaraz23Expert guidance for Cloudflare Zaraz - server-side tag manager for loading third-party tools at the edge.45## What is Zaraz?67Zaraz offloads third-party scripts (analytics, ads, chat, marketing) to Cloudflare's edge, improving site speed, privacy, and security. Zero client-side performance impact.89**Core Concepts:**10- **Server-side execution** - Scripts run on Cloudflare, not user's browser11- **Single HTTP request** - All tools loaded via one endpoint12- **Privacy-first** - Control data sent to third parties13- **No client-side JS overhead** - Minimal browser impact1415## Quick Start16171. Navigate to domain > Zaraz in Cloudflare dashboard182. Click "Start setup"193. Add tools (Google Analytics, Facebook Pixel, etc.)204. Configure triggers (when tools fire)215. Add tracking code to your site:2223```javascript24// Track page view25zaraz.track('page_view');2627// Track custom event28zaraz.track('button_click', { button_id: 'cta' });2930// Set user properties31zaraz.set('userId', 'user_123');32```3334## When to Use Zaraz3536**Use Zaraz when:**37- Adding multiple third-party tools (analytics, ads, marketing)38- Site performance is critical (no client-side JS overhead)39- Privacy compliance required (GDPR, CCPA)40- Non-technical teams need to manage tools4142**Use Workers directly when:**43- Building custom server-side tracking logic44- Need full control over data processing45- Integrating with complex backend systems46- Zaraz's tool library doesn't meet needs4748## In This Reference4950| File | Purpose | When to Read |51|------|---------|--------------|52| [api.md](./api.md) | Web API, zaraz object, consent methods | Implementing tracking calls |53| [configuration.md](./configuration.md) | Dashboard setup, triggers, tools | Initial setup, adding tools |54| [patterns.md](./patterns.md) | SPA, e-commerce, Worker integration | Best practices, common scenarios |55| [gotchas.md](./gotchas.md) | Troubleshooting, limits, pitfalls | Debugging issues |5657## Reading Order by Task5859| Task | Files to Read |60|------|---------------|61| Add analytics to site | README → configuration.md |62| Track custom events | README → api.md |63| Debug tracking issues | gotchas.md |64| SPA tracking | api.md → patterns.md (SPA section) |65| E-commerce tracking | api.md#ecommerce → patterns.md#ecommerce |66| Worker integration | patterns.md#worker-integration |67| GDPR compliance | api.md#consent → configuration.md#consent |6869## Decision Tree7071```72What do you need?7374├─ Track events in browser → api.md75│ ├─ Page views, clicks → zaraz.track()76│ ├─ User properties → zaraz.set()77│ └─ E-commerce → zaraz.ecommerce()78│79├─ Configure Zaraz → configuration.md80│ ├─ Add GA4/Facebook → tools setup81│ ├─ When tools fire → triggers82│ └─ GDPR consent → consent purposes83│84├─ Integrate with Workers → patterns.md#worker-integration85│ ├─ Enrich context → Context Enrichers86│ └─ Inject tracking → HTML rewriting87│88└─ Debug issues → gotchas.md89├─ Events not firing → troubleshooting90├─ Consent issues → consent debugging91└─ Performance → debugging tools92```9394## Key Features9596- **100+ Pre-built Tools** - GA4, Facebook, Google Ads, TikTok, etc.97- **Zero Client Impact** - Runs at Cloudflare's edge, not browser98- **Privacy Controls** - Consent management, data filtering99- **Custom Tools** - Build Managed Components for proprietary systems100- **Worker Integration** - Enrich context, compute dynamic values101- **Debug Mode** - Real-time event inspection102103## Reference104105- [Zaraz Docs](https://developers.cloudflare.com/zaraz/)106- [Web API](https://developers.cloudflare.com/zaraz/web-api/)107- [Managed Components](https://developers.cloudflare.com/zaraz/advanced/load-custom-managed-component/)108109---110111This skill focuses exclusively on Zaraz. For Workers development, see `cloudflare-workers` skill.112