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:
Option 1: 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>
Option 2: Use custom domain (Enterprise)
- Configure analytics.yourdomain.com
- Point to Zenovay servers
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:
- Go to Domains and select your website
- Copy the Website ID
- Compare with your script tag
IDs 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 initial page view recorded
Cause: Single Page Apps don't trigger full page loads
Solution for React Router:
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
function Analytics() {
const location = useLocation();
useEffect(() => {
if (window.zenovay) {
window.zenovay('page');
}
}, [location]);
return null;
}
Solution for Vue Router:
router.afterEach(() => {
if (window.zenovay) {
window.zenovay('page');
}
});
Issue: Localhost/Development Not Tracking
Symptom: Works in production, not locally
Cause: Some configurations exclude localhost
Check dashboard settings:
- Go to Domains and select your website
- Check Allowed Domains
- Add
localhostif needed
Or enable debug mode:
<script
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:
<script
data-tracking-code="YOUR_TRACKING_CODE"
data-debug="true"
src="https://api.zenovay.com/z.js">
</script>
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
- Go to Dashboard → Live
- 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
Script Not Loading
Check:
- Plugin activated
- Website ID entered
- Caching cleared
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 support@zenovay.com with:
- Subject: "Tracking Not Working"
- Information gathered above
- Steps you've already tried