Follow this guide to diagnose and fix issues when Zenovay isn't tracking visitors.
Quick Diagnosis
Check in Browser Console
- Open your website
- Press
F12or right-click → Inspect - Go to Console tab
- Type:
window.zenovay
Expected result: A function (typeof === 'function') If undefined: Script not loading
Check Network Tab
- Go to Network tab
- Refresh the page
- Filter by "zenovay" or "analytics"
- Look for z.js and API calls
Common Issues
Issue: Script Not Loading
Symptom: window.zenovay is undefined
Causes:
- Script tag missing or incorrect
- Ad blocker blocking script
- Content Security Policy (CSP) blocking
- Script loading error
Solutions:
Check your script tag:
<!-- Correct format -->
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
Common mistakes:
<!-- Wrong: Missing website ID -->
<script src="https://api.zenovay.com/z.js"></script>
<!-- Wrong: Typo in URL -->
<script src="https://api.zennovay.com/z.js"></script>
<!-- Wrong: Missing closing tag -->
<script src="https://api.zenovay.com/z.js">
Issue: Ad Blocker Interference
Symptom: Script loads for you but not all visitors
Test:
- Disable your ad blocker
- Refresh the page
- Check if tracking works
Solutions:
Self-host the script:
# Download script
curl -o zenovay.js https://api.zenovay.com/z.js
# Host on your domain
# Then use:
<script src="/js/zenovay.js" data-tracking-code="YOUR_TRACKING_CODE"></script>
Self-hosting serves the script from your own origin, which most ad blockers won't touch. If you self-host, keep the file up to date so you get tracker fixes and new features.
Issue: Content Security Policy Blocking
Symptom: Console shows CSP violation error
Error example:
Refused to load the script 'https://api.zenovay.com/z.js'
because it violates the Content-Security-Policy directive
Solution:
Update your CSP header:
Content-Security-Policy:
script-src 'self' https://api.zenovay.com;
connect-src 'self' https://api.zenovay.com;
Issue: Wrong Website ID
Symptom: No data in dashboard
Check:
- Open Domains and select your website
- Open Settings → General to view the install snippet for that site
- Compare the
data-tracking-codevalue in the snippet with the one on your live page
The codes should match exactly:
<script data-tracking-code="abc123-def456-ghi789"></script>
Issue: Script Loads After User Leaves
Symptom: Low page view counts
Cause: Script in wrong position or slow loading
Solution: Place script in <head> with defer:
<head>
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
</head>
Issue: SPA Not Tracking Page Changes
Symptom: Only the initial page view is recorded in a single-page app (React, Vue, etc.)
How Zenovay handles this: The tracker automatically detects client-side route changes. It patches history.pushState / history.replaceState and listens for popstate and pageshow, so navigations in React Router, Vue Router, Next.js, and similar frameworks are recorded without any extra code.
If you're only seeing the first page view, check that:
- The script is loaded once, near the top of your app (in
<head>withdefer) and isn't removed on route change - Your router actually updates the URL via the History API (most do)
Manual page views (optional): If your app changes the visible "page" without changing the URL, you can record a page view yourself:
if (window.zenovay) {
window.zenovay('page');
}
Only do this for navigations the tracker can't see on its own — calling it on every route change in addition to the automatic tracking will double-count views.
Issue: Localhost/Development Not Tracking
Symptom: Works in production, not locally
Cause: The tracker blocks localhost, 127.0.0.1, and *.local hostnames by default so your development traffic doesn't pollute production data.
To allow tracking on localhost, add data-allow-localhost="true" to the script tag:
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
data-allow-localhost="true"
src="https://api.zenovay.com/z.js">
</script>
You can also turn this on per site in the dashboard: open Domains, select your website, then Settings → General and enable the localhost / debug option.
To see what the tracker is doing, enable debug logging with data-debug="true" (or append ?zenovay_debug=true to the page URL):
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
data-debug="true"
src="https://api.zenovay.com/z.js">
</script>
Issue: HTTPS/HTTP Mismatch
Symptom: Script blocked on HTTPS sites
Cause: Loading HTTP script on HTTPS page
Solution: Always use HTTPS:
<!-- Correct -->
<script src="https://api.zenovay.com/z.js"></script>
<!-- Wrong on HTTPS sites -->
<script src="http://api.zenovay.com/z.js"></script>
Debug Mode
Enable detailed logging by adding data-debug="true" to the script:
<script
defer
data-tracking-code="YOUR_TRACKING_CODE"
data-debug="true"
src="https://api.zenovay.com/z.js">
</script>
You can also enable it on any page without changing the snippet by appending ?zenovay_debug=true to the URL.
Check console for:
- Script initialization
- Page view events
- API responses
- Error messages
Testing Tracking
Manual Test
// In browser console
if (window.zenovay) {
window.zenovay('track', 'test_event', { test: true });
console.log('Event sent!');
} else {
console.log('Zenovay not loaded');
}
Verify in Real-Time
- Open Domains, select your website, and go to the Live View tab
- Visit your site in another tab
- You should appear within seconds
Server-Side Rendering Issues
Next.js
// Only load on client
import dynamic from 'next/dynamic';
const Analytics = dynamic(() => import('./Analytics'), {
ssr: false
});
Nuxt.js
// nuxt.config.js
export default {
head: {
script: [
{
src: 'https://api.zenovay.com/z.js',
'data-tracking-code': 'YOUR_ID',
defer: true,
body: true // Load at end of body
}
]
}
}
WordPress Issues
Zenovay does not provide an official WordPress plugin — you add the tracking script manually (in your theme's header.php, via a wp_head action in functions.php, or with a "header/footer scripts" plugin). See Add Zenovay to WordPress for the exact code.
Script Not Loading
Check:
- The tracking snippet is actually present in the page source (view source, search for
z.js) - The
data-tracking-codevalue matches the one in your dashboard - Caching is cleared after editing the theme or snippet
Cache Plugin Conflicts
Exclude Zenovay from optimization:
WP Rocket:
Settings → File Optimization → Exclude External:
api.zenovay.com
W3 Total Cache:
Performance → Minify → JS Minify Settings → Never minify:
api.zenovay.com/z.js
Verification Checklist
- Script tag present in page source
- Website ID correct
- No console errors
- Network request succeeds (200 status)
- Not blocked by ad blocker
- CSP allows analytics domain
- Correct domain in dashboard settings
- Real-time view shows visits
Still Not Working?
Gather Information
Before contacting support:
- Your website URL
- Browser console errors
- Network tab screenshots
- Website ID (partial)
- When it stopped working
Contact Support
Email [email protected] with:
- Subject: "Tracking Not Working"
- Information gathered above
- Steps you've already tried