Tinker Stats for Rybbit

Tinker Stats for Rybbit

توسط

Tinker Stats for Rybbit integrates your self-hosted Rybbit Analytics instance with WordPress. It manages your Rybbit tracking script on the frontend and surfaces content traffic stats directly in your admin; post list columns, editor publish box, and dashboard widget.

Tracking Script Management:

  • One-click setup — enter your connection details, click Test Connection, and the tracking script is ready to enable.
  • Built-in proxy — bypass ad blockers with one toggle. The plugin serves the tracking script and forwards events through your own domain. No webserver config needed.
  • Script injection — adds the Rybbit tracking script to your frontend via wp_enqueue_script() with configurable script URL, debounce, and session replay.
  • Role exclusion — exclude specific WordPress roles (e.g. administrators, editors) from being tracked.
  • User identification — optionally send logged-in user ID, display name, and role to Rybbit via rybbit.identify().
  • Custom events — fire per-type events (post_view, page_view, archive_view, search_view, etc.) with WordPress metadata as event properties.
  • Error suppression — suppress cross-origin “Script error.” messages from the tracking script. This is related to a bit of a bug in Rybbit error reporting and merely cleans up session reports.

Admin Content Stats Display:

  • Post list column — see view counts for every post at a glance. Click any count to open a detailed chart.
  • Chart modal — daily breakdown with Year/Month/Week tabs and period navigation. Shows total count with percentage change vs previous period.
  • Dashboard widget — site-wide traffic chart, total count with trend indicator, and top 10 pages.
  • Publish box stat — current month view count right in the editor, clickable to open the chart modal.
  • Postmeta sync — hourly cron job saves view counts to post meta for use by themes, page builders, and other plugins.
  • Configurable metric — choose between Pageviews, Visits (sessions), or Users.

Security & Privacy:

  • Encrypted API key — your Rybbit API key is stored encrypted in the database.
  • Caching — configurable transient caching to minimize API calls to your Rybbit instance.
  • API resilience — automatic backoff on errors prevents cascading failures.
  • View permissions — restrict who can see stats in the admin.
  • Privacy-first — Rybbit is cookieless and GDPR-friendly. No data leaves your infrastructure.

This plugin is not an official Rybbit product and is not affiliated with or endorsed by Rybbit. Rybbit trademarks, logos, and brand assets remain the property of their respective owner.

Requirements:

  • A running self-hosted Rybbit Analytics instance (tested with v2.5.0)
  • A Rybbit API key (generated in Settings Account API Keys)
  • WordPress 6.3 or later

Multisite

The plugin works on WordPress Multisite networks (subdirectory, subdomain, and domain-mapped). The plugin can be activated per-subsite or network-wide; either works. Each subsite has its own Tinker Stats menu and runs its own postmeta sync.

How independently each subsite can be configured depends on Rybbit’s per-domain data model. Subdomain and domain-mapped subsites can each connect to their own Rybbit site. Subdirectory subsites must share the parent domain’s Rybbit configuration (Site ID, Tracking ID, URL, and API key), since Rybbit organizes data per registered domain or subdomain rather than by URL path. The URL patterns section below has the full breakdown.

Rybbit + Multisite URL patterns

Rybbit organizes data per registered domain or subdomain, which affects how multisite installs map to Rybbit sites:

  • Subdomain subsites (e.g. sub.example.com) — each can be added as its own Rybbit site for clean separation.
  • Domain-mapped subsites (e.g. example2.com) — each is added as its own Rybbit site, identical to single-site usage.
  • Subdirectory subsites (e.g. example.com/sub) — Rybbit doesn’t support path-based site separation, so all subdirectory subsites must be configured with the same Rybbit Site ID, Tracking ID, URL, and API key as the parent domain. In Rybbit’s dashboard, all subdirectory subsite traffic appears under the parent domain’s site; use Rybbit’s URL/path filters to view per-subsite breakdowns.

If you proxy the Rybbit script through a relative path (e.g. /api/script.js), make sure the proxy is configured on each subsite’s domain.

  1. Upload the tinker-stats-for-rybbit folder to /wp-content/plugins/
  2. Activate the plugin through the ‘Plugins’ menu
  3. Go to Tinker Stats in the admin menu (or you’ll be redirected automatically on first activation)
  4. Enter your Rybbit instance URL, Site ID, and API key
  5. Click “Test Connection” to verify and auto-populate the Tracking ID
  6. Enable tracking in the Tracking section to inject the script on your frontend
  7. Choose your preferred display metric (Pageviews, Visits, or Users)

سوالات متداول

What is Rybbit?

Rybbit is an open-source, privacy-friendly web analytics platform — a modern alternative to Google Analytics. It supports self-hosting and tracks visitors without cookies.

Does this plugin add tracking to my site?

Yes, if you enable it. The Tracking section lets you inject the Rybbit tracking script on your frontend with one toggle. You can also configure role exclusion, user identification, and custom events. If tracking is disabled, the plugin only reads existing analytics data from your Rybbit instance via its API.

What does the postmeta sync do?

Every hour, the plugin fetches lifetime cumulative metrics from Rybbit and saves them as post meta (_tinker_stats_views). This makes view counts available to themes, page builders, and sorting queries.

The stored value is a running total from the date your Rybbit site was first created — it doesn’t reset at month boundaries. The plugin auto-detects this start date from your Rybbit instance the first time it syncs; if the connection details change (different Rybbit instance or different Site ID), the start date is re-detected on the next sync.

Can I trigger a manual sync?

Yes. Go to Tinker Stats Settings and click “Sync Postmeta Now” in the Tools section.

Is my API key stored securely?

Yes. The API key is encrypted using AES-256-CBC with keys derived from your WordPress salts before being stored in the database.

My visits aren’t being counted — what’s wrong?

The most common cause is ad blockers (uBlock Origin, Brave’s built-in blocker, etc.) blocking the Rybbit tracking script. Even though Rybbit is privacy-friendly and cookieless, some blocklist maintainers block all analytics scripts indiscriminately. Estimates put the impact between 6% and 60% of visitors depending on your audience’s technical level.

A common gotcha: ad blocker filter lists also match on URL keywords. Words like “stats”, “analytics”, “tracking”, “metrics”, or “telemetry” anywhere in the script URL will trigger blockers regardless of the actual script content. If your Script URL contains any of these, expect blocking even before the request reaches your server.

The fix is to proxy the tracking script through your own domain so it loads as a first-party request. The plugin includes a built-in proxy that handles this for you: go to Tinker Stats Settings Tracking and enable the “Bypass Ad Blockers” toggle. The plugin will fetch and cache the Rybbit script, generate a randomized first-party path, and forward all tracking events through your own domain. No webserver config required.

If you’d rather configure the proxy yourself at the webserver or CDN level, see Rybbit’s proxy guide and enter the relative path (e.g. /api/script.js) in the Script URL field.

To verify your tracking is actually firing, open your Rybbit dashboard, go to Site Settings Tracking Script, and click “Verify Installation”. Rybbit will check whether the script is loading on your site and confirm the connection.

Other less common causes: tracking is disabled in the plugin settings, your role is in the Exclude Roles list, or the tracking ID isn’t populated yet.

How does the built-in proxy work?

When enabled, the plugin generates a randomized 8-character hex prefix (e.g. k3p9m2qr) and serves the Rybbit tracking script and tracking endpoints through https://yoursite.com/[hash]/.... Static script files are cached locally and refreshed daily; tracking POSTs are forwarded to your Rybbit instance in real time, with the visitor’s real IP address preserved via X-Forwarded-For.

The randomized prefix breaks ad blocker rules that anchor on the platform-pattern /api/ path used by analytics services. You can regenerate paths anytime, refresh the script cache manually, and verify proxy reachability with the Test Proxy button.

The proxy works on most hosts without webserver-level changes. On WordPress Multisite, each subsite gets its own proxy paths (subdirectory subsites can share the parent domain’s Rybbit Site ID; subdomain and mapped-domain subsites have their own).

I use page caching — do I need to do anything?

The tracking script is injected into your page HTML via wp_enqueue_script(), so it becomes part of the cached HTML output. This is normally desirable: once cached, the script tag is served on every page hit without any per-request PHP work.

The trade-off: if you enable, disable, or change tracking settings, your cached HTML still reflects the previous state. You’ll need to purge your page cache (FastCGI, Cloudflare, Varnish, etc.) for the change to take effect on the frontend.

The built-in proxy’s cached script files (/tsr-{hash}/script.js etc.) are static files at WordPress root, served directly by your webserver. They’re independent of WordPress page caching: they refresh on their own daily-cron schedule and aren’t affected by page cache purges.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
1.4.1.3 136 کیلوبایت -
دانلود
×
بدون امتیاز

قیمت:

رایگان

نگارش

1.4.1.3

آخرین انتشار

1 خرداد 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

-

نگارش وردپرس

وردپرس 6.3+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 7.4+

نسخه ها

1 نسخه