Dashboard — click stats and recent activity at a glance
The Dashboard is the default landing page when you click Royal Links in the WordPress admin sidebar. Four stat cards, recent link activity, top-performing links, and the last ten clicks — every stat you need to see how your links are performing is on one screen. This page covers what each card shows, how the numbers are calculated, and the actions available from each section.
The Dashboard is the first thing you see when you click Royal Links in the admin menu. Four stat cards summarise Total Clicks (30d), Unique Visitors (30d), Total Links (all time), and Unresolved 404s (30d). Below that: five most recent links with copy-to-clipboard, five top-performing links in the last 30 days with visual bars, and the last ten clicks with country, device, and timestamp. Every card links deeper into the relevant admin page.
Where the Dashboard lives
The Dashboard is the first submenu item under the Royal Links menu in the WordPress admin sidebar. Because it’s the first submenu, clicking the parent Royal Links menu item takes you straight to the Dashboard by default — no need to click twice.
Direct URL:
/wp-admin/edit.php?post_type=royal_link&page=royal-links-dashboard
Sidebar position after 2.0.12 (top to bottom):
- Dashboard ← default landing page
- Royal Links (the CPT list of your short URLs)
- Add New
- Analytics
- 404 Redirects
- Link Health
- Categories & Tags (taxonomies)
- Split Tests
- Import/Export
- Settings
- Royal Tools
First-run activation redirect
When you install or update Royal Links, the very next page load in /wp-admin/ automatically routes you to the Dashboard, so you land on the overview instead of wherever you happened to be. This one-shot redirect is per-user, expires after 60 seconds, and never fires during:
- Bulk plugin activation (activating multiple plugins at once)
- AJAX requests, cron jobs, or WP-CLI runs
- Network admin (multisite parent) pages
- Form POST submissions — your form target always runs first
- Non-admin user sessions (only
manage_optionscapabilities trigger it)
The four stat cards
The top row of the Dashboard is four stat cards, each with a coloured top border for quick scanning, a big tabular number, a time-window label, and a link into the deeper admin view for that metric.
| Card | Window | What it counts | Click goes to |
|---|---|---|---|
| Total Clicks (blue) | Last 30 days | Every row in the click log with click_date >= now() − 30 days. |
Analytics page |
| Unique Visitors (green) | Last 30 days | COUNT(DISTINCT ip_address) across the same 30-day window. Rows with a null / empty IP are excluded (privacy mode). |
Analytics page |
| Total Links (gold) | All time | Every published royal_link post. Draft, private, and trashed links are excluded. |
Links list (CPT) |
| Unresolved 404s (red / grey) | Last 30 days | Rows in wp_royal_links_404_log where resolved = 0 and last_hit_at is within the last 30 days. Card border is red when the count is non-zero, grey when it's zero. |
404 Redirects page |
If you disabled Store IP addresses under Royal Links → Settings, Unique Visitors reads 0 (there's no IP to count DISTINCT on). The Total Clicks card is unaffected — it counts rows, not distinct visitors.
Recent Links (left column)
The left panel lists the five newest published royal_link posts, ordered by post date descending. Each row shows the link title, the short URL, and a copy-to-clipboard button.
What each row does
- Click the title → opens the edit-link screen for that link.
- Click the clipboard icon → copies the full short URL to your clipboard. The button briefly shows “Copied!” to confirm before reverting.
- “View all →” in the panel header → jumps to the full Links list.
Zero state
If you haven’t created any links yet, the panel shows an “+ Add your first link” button instead of an empty list.
Top Performing Links (right column)
The right panel lists the five links with the most clicks in the last 30 days. Under each title, a horizontal gold bar shows that link’s click count relative to the top link (which always fills 100%), so the visual gap between #1 and #5 tells you at a glance how skewed the traffic is.
How the ranking is computed
SELECT link_id, COUNT(*) AS clicks
FROM {prefix}royal_links_clicks
WHERE click_date >= now() − 30 days
GROUP BY link_id
ORDER BY clicks DESC
LIMIT 5Click any row title to jump to the edit-link screen for that link.
Zero state
If nothing has been clicked in the last 30 days, the panel shows: “No clicks recorded yet — share your first link to start seeing data here.”
Recent Clicks (full-width table)
The bottom section is a full-width table of the last ten click events on any link. Columns:
| Column | What it shows |
|---|---|
| Link | Title of the link that was clicked (links to the edit screen). Deleted links show as “(deleted link)”. |
| Country | Country resolved from the visitor’s IP address on the click (populated when geo-lookup is available for that click). Dash if country was not captured on the row. |
| Device | Desktop / Mobile / Tablet, from user-agent parsing. |
| When | Relative time (e.g. “10 hours ago”). Hovering the cell shows the absolute local timestamp. |
The table is read-only — it’s a live activity feed, not an interactive table. For per-link click detail or filtering by date range, click View analytics → in the section header to open the full Analytics page.
Header, Add New, and family chrome
Above the Dashboard page title, a slim white header bar renders on every Royal Links admin page. It has:
- The gold Royal Plugins R logo + Royal Links wordmark on the left
- Two buttons on the right: View Docs (opens royalplugins.com support hub in a new tab) and Support (opens the wp.org support forum for Royal Links)
At the top of the Dashboard content, the page title row has an + Add New primary button (right-aligned) that jumps straight to the new-link screen.
The footer of every Royal Links admin page is replaced with a lightweight family strip: “Royal Plugins · Blog · YouTube · GitHub” on the left, and the running Royal Links version number on the right.
What’s not on the Dashboard (and where to find it)
The Dashboard is a summary landing page, not a deep analytics view. For anything more specific:
- Click chart / time-series → Analytics page (30-day chart, per-link chart, referrer breakdown, browser + device splits)
- Filter clicks by date range → Analytics page — the Dashboard is fixed to last-30-days windows
- Full 404 monitor log → 404 Redirects page — the Dashboard card only shows the count
- Broken outbound link scanner → Link Health page
- A/B split test results → Split Tests page
- Import from Pretty Links / ThirstyAffiliates / BetterLinks → Import/Export page
- Per-link click stats → edit-link screen has a Link Statistics side-panel with total clicks, unique clicks, and last-click timestamp for that link