

Overview with KPIs and top lists
Google Analytics alternative for WordPress: clean stats, interactions, verified bots, UTM, GeoIP, CSV export. Privacy-first.
Want richer details like city/region, device brand/model, or verified bot checks?
Nothing is sent to YEB until you add a key and turn on a feature — you choose.
Show small, public counters anywhere (pages, posts, widgets, site editor).
Basic:
`
[waby_visits_stats] ; whole site, last 7 days
[waby_visits_stats period=”30d”] ; whole site, last 30 days
[waby_visits_stats period=”1d” bots=”only”] ; bots only, yesterday
[waby_visits_stats page=”/pricing”] ; just /pricing page, last 7 days
`
Auto-detect current page:
`
[waby_visits_stats current_page]
`
If page="" isn’t provided, current_page uses the current request path.
Show exactly what you want:
`
[waby_visits_stats show=”visits”] ; only total visits (pageviews)
[waby_visits_stats show=”uniques”] ; only unique visitors
[waby_visits_stats show=”both”] ; both (default)
`
Bot filter:
– bots="exclude" (default) — show human traffic and unverified bot-like traffic treated as human
– bots="only" — bot traffic only
– bots="include" — include everything
Labels, layout & CSS hooks (for custom styling):
`
[waby_visits_stats
current_page
show=”both”
label_visits=”Views”
label_uniques=”Visitors”
layout=”inline” ; inline | stack
sep=” • ”
wrap_tag=”div” ; div | span | p
item_tag=”span” ; span | div
wrapper_class=”stats stats–mini”
item_class=”stats__item”
label_class=”stats__label”
value_class=”stats__value”
]
``
All attributes:
– period: 1d, 7d (default), 30d
– page: limit to a path (e.g. /pricing)
– current_page: presence-only flag to use the current URL path
– bots: exclude (default), only, include
– show: visits, uniques, both (default)
– label_visits (default Visits), label_uniques (default Unique)
– layout: inline (default) or stack
– sep: separator when layout="inline" (default |)
– wrap_tag: div (default), span, p
– item_tag: span (default), div
– wrapper_class, item_class, label_class, value_class: extra CSS classes
Paste this CSS into Appearance Customize Additional CSS (or your theme stylesheet):
`css
/* YEB Visits – public stats */
.yeb-visits-stats {
display: inline-flex;
gap: .75rem;
align-items: baseline;
font: 500 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.yeb-visits-stats.yeb–layout-stack {
display: inline-grid;
gap: .35rem;
}
.yeb-visits-stats .yeb-metric {
display: inline-flex;
gap: .35rem;
align-items: baseline;
white-space: nowrap;
}
.yeb-visits-stats .yeb-metric__label { opacity: .7; }
.yeb-visits-stats .yeb-metric__value { font-weight: 700; }
.yeb-visits-stats .yeb-sep { opacity: .35; }
“
You choose which extras to enable (location, device details, bot verification). IPs are stored in a way that groups them by network (not exact address). You can limit how often extras are called and how much data is kept.
This plugin can optionally call the YEB API to enrich your local analytics. Nothing is sent to YEB until you add an API key in Analytics (YEB) Settings and enable the related toggle.
Endpoints (HTTPS):
{base}/country, {base}/city, {base}/asn (default base: https://api.yeb.to/v1/geoip){endpoint} (default: https://api.yeb.to/v1/device-analyze){base} or {base}/{vendor} (default base: https://api.yeb.to/v1/bot/detect/detect)What is sent and when:
All requests use HTTPS. The plugin stores analytics locally; enrichment results are cached locally.
YEB policies:
Two first-party cookies (pseudonymous GUIDs):
yeb_sid — session id, 30 minutes; groups pageviews into sessions.yeb_vid — visitor id, 1 year; counts returning unique visitors.By default, the beacon loads for visitors (logged-in admins excluded unless you enable Track logged-in admins). If your jurisdiction or policy requires consent before placing analytics cookies, gate the beacon with your consent tool.
Example (dequeue until consent):
`php
/**
* Stop the YEB beacon until a custom consent flag is set.
* Replace the condition with your CMP’s check.
*/
add_action(‘wp_enqueue_scripts’, function () {
$consent_given = isset($_COOKIE[‘my_consent_flag’]) && $_COOKIE[‘my_consent_flag’] === ‘yes’;
if ( ! $consent_given ) {
wp_dequeue_script(‘waby-visits-beacon’);
wp_deregister_script(‘waby-visits-beacon’);
}
}, 100);
`
The plugin exposes an intentionally public ingest endpoint used by the front-end beacon:
`
POST /wp-json/waby/v1/visit
Alias: POST /wp-json/yeb/v1/visit
`
It accepts sanitized visit metadata (URL, path, referrer, UTM, screen, language, etc.) and stores it in your site’s database. It does not expose private data or modify content.
waby_visits_stats_output — filter the final HTML of the public stats shortcode.waby_visits_cache_ttl — filter select-query cache TTL (seconds) used by the dashboard and shortcode.