Skip to main content
7 min read

Cloudflare Zaraz

Integration status — not yet end-to-end verified by Zenovay. This guide describes a Zaraz install path that Cloudflare's API confirms is correctly configurable, but we have not yet completed a verified live install on a paid Cloudflare zone. If you try it and it works (or doesn't), please tell us at [email protected]. For a verified install path that works on any setup, see the Tracking Script reference.

Deploy Zenovay Analytics through Cloudflare Zaraz without touching your website's source code. Zaraz moves third-party scripts to the edge, so adding analytics has near-zero impact on your page load time.

If your site is already behind Cloudflare, this is the fastest install path: no code deploys, no theme edits, and the tracker runs server-side at the edge.

Before you start — Cloudflare plan requirement: The Zaraz Custom HTML tool requires the execute_unsafe_scripts permission, which Cloudflare gates by zone plan. If your zone is on the Free plan, the dashboard will let you save the configuration but the action silently fails to deploy — the "Activity last 24hr" graph stays empty and no tracker is injected on pageviews. If you don't see traffic in Zenovay within a few minutes of completing this guide, check your zone's plan. The reliable path is Pro plan or higher (~$5/month per zone). Alternatives for Free-plan zones: use Cloudflare Workers first-party tracking instead, or paste the snippet directly into your HTML.


Why use Zaraz?

Zaraz is Cloudflare's tag management product. Unlike traditional client-side tag managers, Zaraz:

  • Runs at the edge — the tracking script is injected by Cloudflare's network, not by a third-party CDN.
  • Has zero render-blocking impact on Core Web Vitals (LCP, INP).
  • Respects consent through its built-in Consent Manager (works alongside the Zenovay cookieless mode).
  • No build step required — paste a Custom HTML snippet, save, done.

Zaraz is included on every Cloudflare plan, including Free.


Time required: ~3 minutes

Step 1 — Open Zaraz

  1. Log in to the Cloudflare dashboard
  2. Pick the account that owns your zone (Zaraz is configured at the account level, not the zone level)
  3. From the left sidebar, expand Tag Management → click Zaraz

Or open Zaraz directly — the :account placeholder resolves to your currently selected Cloudflare account.

Step 2 — Add the Custom HTML tool

  1. Click Add new tool
  2. From the catalog, scroll to Custom Code and select Custom HTML
  3. Give the tool a name: Zenovay Analytics

Step 3 — Paste the tracking snippet

In the HTML field, paste:

<script
  defer
  data-id="YOUR_TRACKING_CODE"
  src="https://api.zenovay.com/z.js">
</script>

Replace YOUR_TRACKING_CODE with your tracking code from Settings → General in your Zenovay dashboard.

Step 4 — Configure the trigger

Set the Firing Trigger to Pageview.

Two settings must both be correct for the tracker to actually fire — they look independent in the dashboard but they aren't:

  1. The action's Firing Trigger is Pageview, NOT "All Tracks". "All Tracks" only fires on explicit zaraz.track() JavaScript calls — on a plain page load it never fires.

  2. Zaraz "Automatic Pageview Tracking" is enabled at the zone level. Even with the Pageview trigger selected on the action, Zaraz doesn't auto-fire Pageview events unless the global toggle is on. To enable: open the same Zaraz UI → click SettingsGeneral Settings → scroll to the "Other" section → tick "Automatic Pageview Tracking" → click Save.

If either is missing, no events arrive — and Zaraz reports zero activity in the action's "Activity last 24hr" graph.

  • Firing Trigger: Pageview (required)
  • Blocking Triggers: leave empty
  • Match: All pages (no filter)

Step 5 — Save and publish

  1. Click Save
  2. Zaraz publishes immediately — no separate deploy step

Open your website in a new tab. Within a minute, your first visitor should appear in the Zenovay dashboard.


Cookieless mode

Zenovay's cookieless mode works in Zaraz too. Replace the snippet in Step 3 with:

<script
  defer
  data-id="YOUR_TRACKING_CODE"
  data-cookieless="true"
  src="https://api.zenovay.com/z.js">
</script>

When data-cookieless="true" is set, Zenovay does not write cookies or localStorage. This pairs naturally with Zaraz's edge-side execution: the visitor's browser never receives a tracking cookie, satisfying ePrivacy / TDDDG / FMG Art. 45c by default.


Custom events

Zaraz can call window.zenovay() directly from any Zaraz Action. To send a custom event:

  1. In Zaraz, open Custom HTML → add a second tool (or edit your existing one)
  2. Use this snippet pattern:
<script>
  if (window.zenovay) {
    window.zenovay('track', 'signup', { plan: 'pro' });
  }
</script>
  1. Set the trigger to your custom Zaraz event (for example: a Click trigger on the signup button)

For all available event helpers, see Custom Events.


If you use Zaraz's built-in Consent Manager:

  1. Open the Zenovay tool → Consent tab
  2. Set Consent Purpose to Analytics (or the category your visitors opt into)
  3. Save

If your visitors decline analytics consent, Zaraz will not fire the Zenovay tool. To work without a consent banner at all, enable cookieless mode above — Zenovay then operates lawfully under ePrivacy Art. 5(3) without consent.


First-party proxy (ad-blocker bypass)

If you've set up a first-party proxy on your own subdomain (e.g. analytics.yourdomain.com), change the src in your Zaraz snippet to your proxy URL:

<script
  defer
  data-id="YOUR_TRACKING_CODE"
  src="https://analytics.yourdomain.com/z.js">
</script>

Because Zaraz already runs at the edge for your zone, pairing it with a first-party proxy gives maximum resilience against ad-blockers.


SPA support (React, Next.js, Vue, Angular)

The Zenovay tracking script auto-detects route changes in single-page applications. No additional Zaraz triggers needed — the default Pageview trigger is enough.

Do not load the Zenovay script both in Zaraz and directly in your &lt;head&gt;. Pick one path or you'll record duplicate page views.


Verifying the install

After publishing in Zaraz, the easiest verification path is:

  1. Open your website in an Incognito / Private window
  2. Open Developer Tools → Network tab
  3. Filter by zenovay
  4. Reload the page

You should see a request to https://api.zenovay.com/z.js (the tracker bundle) and at least one request to /api/track/... (the pageview event). Both should return HTTP 200.

In the Zenovay dashboard, your domain's Setup → Installation card flips to "Verified" within ~30 seconds of the first event.


Troubleshooting

SymptomFix
Tracker not loadingConfirm the Zaraz tool is Enabled (toggle in the tools list) and that Zaraz itself is enabled for your zone.
No data in dashboardVerify the data-id matches the tracking code on Settings → General exactly.
Duplicate page viewsRemove any direct <script> tag for Zenovay from your HTML — Zaraz is now the single source.
window.zenovay is not a functionZaraz fires Custom HTML on Pageview by default, but custom event snippets must wait for the tracker to register. Wrap in if (window.zenovay) like the example above.
Content Security Policy errorsAdd https://api.zenovay.com to script-src and connect-src. If you proxy the tracker, allow your proxy domain too.
Conflicting Cloudflare Web AnalyticsZenovay and Cloudflare Web Analytics can coexist, but you'll be paying for two trackers. Pick one.

Performance impact

Because Zaraz injects the script at the Cloudflare edge — before the HTML is sent to the visitor's browser — the tracker is treated as part of your site origin. There is no third-party DNS resolution, no extra TLS handshake, and no render-blocking external request.

Measured on a typical site, switching from a <head>-injected Zenovay tracker to a Zaraz-injected one removes one DNS lookup (~20-60 ms) and one TLS handshake (~80-200 ms) from the critical path.



Need help? Contact [email protected] or visit our Help Center.

Was this page helpful?