Skip to main content
Free15 minutesAdvanced

Google Tag Manager: routing Zenovay through a first-party proxy

Load Zenovay through Google Tag Manager and route tracking through your own domain (a first-party proxy) to reduce ad-blocker loss. Here's the real setup.

gtmserver-sidetag-managerfirst-party
Last updated:

If you want to keep tracking on your own domain and reduce ad-blocker loss, the way to do it with Zenovay is a first-party proxy — a subdomain on your own domain that forwards tracking requests to Zenovay, so the browser only ever talks to your domain.

There are two separate things people mean by "server-side GTM" with Zenovay. This article covers both and is clear about what each one can and can't do.

Info

Zenovay does not publish a Google Tag Manager server-container client template. The Zenovay GTM template is a standard web-container tag template that loads the tracker (z.js) on the page from https://api.zenovay.com. The GTM template cannot be pointed at a first-party proxy — its loader URL is fixed. If you want a first-party proxy, install the tracker manually (with data-api-url) instead of using the GTM template — see First-party tracking. If you'd rather skip GTM entirely, you can send events straight to the tracking endpoint — see Server-side tracking.

Option A — Deploy via the Zenovay GTM template

This is the no-code path. The tag loads z.js directly from https://api.zenovay.com. It does not route through a proxy — if ad-blocker bypass is your goal, use Option B instead.

Step 1 — Add the Zenovay GTM template

  1. In Google Tag Manager (your Web container), go to Templates → Tag Templates → Search Gallery.
  2. Search for Zenovay and add Zenovay Analytics to your workspace. (If it isn't in the gallery yet, you can import template.tpl from the Zenovay GTM template repository instead.)
  3. Click Add to workspace.

Step 2 — Configure the tag

  1. Tags → New → Zenovay Analytics (under Custom).
  2. Settings (the template has exactly these four fields):
    • Tracking Code — paste your Zenovay tracking code (from Settings → General on your website's dashboard).
    • Cookieless Mode — optional. See Cookieless mode below.
    • Track Outbound Links — optional; auto-tracks clicks to external domains.
    • Debug Mode — optional; verbose console logging. Turn it off before publishing.
  3. Set the trigger to All Pages.
  4. Save → SubmitPublish.

Info

The Zenovay script detects SPA route changes via the History API, so the All Pages trigger is all you need — no separate History Change trigger required.

Step 3 — Verify

  1. Open a real visit on your site.
  2. In GTM Preview mode, confirm the Zenovay Analytics tag fires on the page.
  3. DevTools → Network → filter by z.js — you should see it load from api.zenovay.com.
  4. In your website's dashboard, open the Live View tab — the visit should appear within a few seconds.

Option B — First-party proxy (ad-blocker bypass)

A first-party proxy keeps tracking on your own domain. It adds operational overhead — you run a small reverse-proxy on a subdomain of your own domain and maintain it. It's worth it if:

  • You're seeing meaningful adblock-driven data loss and want first-party-domain delivery.
  • Your security/legal team requires that all third-party HTTP requests be served from your own origin.

If neither applies, the regular client-side tracker (Option A or a plain snippet) is simpler. First-party proxying is available on all plans.

Info

The GTM template can't do this — its loader URL is fixed to api.zenovay.com. The proxy needs the manual tracking snippet, where you control the src and data-api-url. So this option doesn't use the Zenovay GTM template.

How it works

Browser  →  https://analytics.example.com  →  https://api.zenovay.com
              (your first-party proxy)

The browser only sees analytics.example.com (your domain). Your proxy fetches z.js from Zenovay and forwards tracking requests through to Zenovay.

Step 1 — Stand up a first-party proxy

Create a subdomain on your own domain (e.g. analytics.example.com) and configure it to reverse-proxy to https://api.zenovay.com. The exact steps depend on your stack (Cloudflare, nginx, a Cloud Run / serverless function, etc.) — the First-party tracking guide walks through the options.

The proxy must:

  • Serve z.js (forwarded from https://api.zenovay.com/z.js).
  • Forward tracking requests to Zenovay, passing the visitor's real IP via X-Forwarded-For so country/city detection still works on Zenovay's side.

Step 2 — Point the tracking snippet at your proxy

Install the tracker manually (not via the GTM template), with the src and data-api-url set to your proxy subdomain:

<script
  defer
  src="https://analytics.example.com/z.js"
  data-tracking-code="YOUR_TRACKING_CODE"
  data-api-url="https://analytics.example.com"
></script>

You can still place this snippet through GTM if you like — use a Custom HTML tag with the All Pages trigger instead of the Zenovay template tag.

Step 3 — Verify end-to-end

  1. Open a real visit on your site.
  2. DevTools → Network → filter by analytics.example.com — you should see z.js load and tracking requests routed through your proxy domain.
  3. In your website's dashboard, open the Live View tab — the visit should appear within a few seconds.

Cookieless mode

You can run cookieless either way. In the GTM template, enable Cookieless Mode; with a manual snippet, add data-cookieless="true". In cookieless mode the tracker uses in-memory, window-scoped IDs only — no cookies are written, on the page or through a proxy.

Plan availability

Both the GTM template and the first-party proxy work on all plans, Free included. Tracked events count toward your plan's monthly event allowance the same way regardless of how the tracker is loaded.

Was this article helpful?