Embeddable Widgets
Zenovay provides ready-to-use widgets that you can embed on your website to display live visitor counts, activity timelines, and geographic breakdowns. No authentication required - just use your tracking code.
Widget Types
| Widget | Description | Use Case |
|---|---|---|
| Realtime | Live visitor count | Show current online visitors |
| Preview | 24-hour activity timeline | Display visitor activity over the past day |
| Recent | 30-minute breakdown by country | Show recent visitor locations |
Base URL
All widget endpoints are available at:
https://api.zenovay.com/widgets/{trackingCode}
Replace {trackingCode} with your website's tracking code (e.g., ZV_XXXXXXXXXXX).
Realtime Widget
Displays the current number of live visitors on your website:
/widgets/:trackingCode/realtimeLive visitor count widget
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
mainTextSize | string | 48px | Font size for the visitor count |
primaryColor | string | #e78468 | Primary accent color (hex) |
theme | string | system | Theme: light, dark, or system |
hideBranding | boolean | false | Hide "Powered by Zenovay" footer (Enterprise) |
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/realtime?theme=dark&primaryColor=%236366f1"
width="200"
height="120"
frameborder="0"
style="border-radius: 12px; overflow: hidden;"
></iframe>Widget Preview:
The realtime widget displays:
- Large visitor count number
- "visitors online now" label
- Animated pulse indicator
- Optional branding footer
Preview Widget (24-Hour Timeline)
Displays visitor activity over the past 24 hours as a timeline chart:
/widgets/:trackingCode/preview24-hour activity timeline widget
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
mainTextSize | string | 36px | Font size for the total count |
primaryColor | string | #e78468 | Chart line color (hex) |
secondaryColor | string | #8dcdff | Chart fill color (hex) |
theme | string | system | Theme: light, dark, or system |
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/preview?theme=light&primaryColor=%236366f1"
width="400"
height="200"
frameborder="0"
style="border-radius: 12px; overflow: hidden;"
></iframe>Widget Preview:
The preview widget displays:
- Total visitors in the last 24 hours
- Hourly breakdown chart
- Peak hour indicator
- Trend arrow (up/down vs previous day)
Recent Widget (Country Breakdown)
Displays visitor activity from the last 30 minutes broken down by country:
/widgets/:trackingCode/recent30-minute breakdown by country
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
mainTextSize | string | 32px | Font size for the count |
primaryColor | string | #e78468 | Primary accent color (hex) |
theme | string | system | Theme: light, dark, or system |
hideBranding | boolean | false | Hide branding footer (Enterprise) |
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/recent?theme=dark"
width="300"
height="250"
frameborder="0"
style="border-radius: 12px; overflow: hidden;"
></iframe>Widget Preview:
The recent widget displays:
- Visitor count from the last 30 minutes
- Top countries with flags
- Percentage breakdown by country
- Live updating every 30 seconds
Styling Examples
Dark Theme with Custom Colors
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/realtime?theme=dark&primaryColor=%2310b981&mainTextSize=64px"
width="220"
height="140"
frameborder="0"
style="border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);"
></iframe>Light Theme for Dashboards
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;">
<!-- Live Visitors -->
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/realtime?theme=light"
width="100%"
height="120"
frameborder="0"
></iframe>
<!-- 24h Timeline -->
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/preview?theme=light"
width="100%"
height="120"
frameborder="0"
></iframe>
<!-- Countries -->
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/recent?theme=light"
width="100%"
height="120"
frameborder="0"
></iframe>
</div>JavaScript Dynamic Loading
Load widgets dynamically with JavaScript:
function loadZenovayWidget(trackingCode, type, options = {}) {
const defaults = {
theme: 'system',
primaryColor: '#e78468',
mainTextSize: '48px'
};
const settings = { ...defaults, ...options };
const params = new URLSearchParams(settings).toString();
const iframe = document.createElement('iframe');
iframe.src = `https://api.zenovay.com/widgets/${trackingCode}/${type}?${params}`;
iframe.width = options.width || '200';
iframe.height = options.height || '120';
iframe.frameBorder = '0';
iframe.style.borderRadius = '12px';
return iframe;
}
// Usage
const widget = loadZenovayWidget('ZV_XXXXXXXXXXX', 'realtime', {
theme: 'dark',
primaryColor: '#10b981',
width: '250',
height: '150'
});
document.getElementById('widget-container').appendChild(widget);React Component
Embed widgets in React applications:
interface ZenovayWidgetProps {
trackingCode: string;
type: 'realtime' | 'preview' | 'recent';
theme?: 'light' | 'dark' | 'system';
primaryColor?: string;
width?: number;
height?: number;
}
function ZenovayWidget({
trackingCode,
type,
theme = 'system',
primaryColor = '#e78468',
width = 200,
height = 120
}: ZenovayWidgetProps) {
const params = new URLSearchParams({
theme,
primaryColor
}).toString();
return (
<iframe
src={`https://api.zenovay.com/widgets/${trackingCode}/${type}?${params}`}
width={width}
height={height}
frameBorder="0"
style={{ borderRadius: '12px', overflow: 'hidden' }}
title={`Zenovay ${type} widget`}
/>
);
}
// Usage
<ZenovayWidget
trackingCode="ZV_XXXXXXXXXXX"
type="realtime"
theme="dark"
primaryColor="#10b981"
width={250}
height={150}
/>Vue Component
Embed widgets in Vue applications:
<template>
<iframe
:src="widgetUrl"
:width="width"
:height="height"
frameborder="0"
:style="{ borderRadius: '12px', overflow: 'hidden' }"
:title="`Zenovay ${type} widget`"
/>
</template>
<script setup lang="ts">
import { computed } from 'vue';
interface Props {
trackingCode: string;
type: 'realtime' | 'preview' | 'recent';
theme?: 'light' | 'dark' | 'system';
primaryColor?: string;
width?: number;
height?: number;
}
const props = withDefaults(defineProps<Props>(), {
theme: 'system',
primaryColor: '#e78468',
width: 200,
height: 120
});
const widgetUrl = computed(() => {
const params = new URLSearchParams({
theme: props.theme,
primaryColor: props.primaryColor
}).toString();
return `https://api.zenovay.com/widgets/${props.trackingCode}/${props.type}?${params}`;
});
</script>White-Label (Enterprise)
Enterprise customers can remove Zenovay branding:
<iframe
src="https://api.zenovay.com/widgets/ZV_XXXXXXXXXXX/realtime?hideBranding=true&primaryColor=%23your-brand-color"
width="200"
height="100"
frameborder="0"
></iframe>The hideBranding parameter is only available on the Enterprise plan. Contact sales to enable white-label widgets for your account.
Caching and Performance
Widgets are optimized for performance:
- CDN Cached: Widget HTML is cached at the edge for fast loading
- Data Updates: Live data refreshes every 5-30 seconds automatically
- Lightweight: Self-contained HTML with no external dependencies
- Responsive: Widgets adapt to their container size
Security Considerations
Widgets only display read-only analytics data. Your tracking code is designed to be public and cannot be used to modify or access sensitive data.
- Widgets use your public tracking code, not your API key
- No authentication is required to display widgets
- Data displayed is limited to aggregate statistics
- No personally identifiable information is exposed
Next Steps
- External API - Full API access with authentication
- Real-Time Data - JSON endpoints for custom integrations
- Custom Events - Track custom user actions