Compare commits

...

13 commits
v1.1.0 ... main

Author SHA1 Message Date
873430d0ce Upload files to "/" 2026-05-15 09:33:06 +00:00
5f38d7952c Upload files to "/" 2026-04-22 06:37:15 +00:00
0c37fd6da2 Upload files to "/" 2026-04-21 22:08:01 +00:00
cc526a7c10 Upload files to "/" 2026-04-21 11:22:00 +00:00
5099f058eb Upload files to "/" 2026-04-21 08:08:48 +00:00
7434ded2c8 Upload files to "/" 2026-04-21 07:59:24 +00:00
41ac17d1e1 Upload files to "/" 2026-04-21 04:56:47 +00:00
7b60842f75 Update README.md 2026-04-18 21:54:41 +00:00
7163b3614d Sync folders 2026-04-18 23:52:13 +02:00
f1f30fe274 Sync folders 2026-04-18 23:44:39 +02:00
da53f4587d Sync folders 2026-04-18 23:38:56 +02:00
d6c45d240d Upload files to "/" 2026-04-18 09:25:22 +00:00
94c9602bde Upload files to "/" 2026-04-18 08:44:28 +00:00
18 changed files with 3479 additions and 1840 deletions

View file

@ -1,3 +1,46 @@
# Ansico-Stat-plugin
# Ansico Stat plugin
Shows basic stats in a WordPress site
Ansico Stat Plugin is a lightweight statistics plugin for WordPress that tracks views across your site and provides admin-friendly reporting in the dashboard and in dedicated statistics pages.
## Features
Features include:
- Track views for posts, pages, and selected public custom post types
- Track views for front page, posts page, archives, taxonomies, search results, and 404 pages
- Admin-only frontend view counter
- Monthly and yearly statistics pages
- Daily total views charts
- Top views by month and year
- Referral source statistics
- Device, browser, and operating system breakdowns
- Bot exclusion and logged-in user exclusion rules
- Reset statistics from the settings page
## Installation
1. Upload the plugin folder to the `/wp-content/plugins/` directory, or upload the ZIP from the WordPress admin.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to `Ansico Stat Plugin` in the admin menu to configure settings and view statistics.
Or install it through Ansico plugins.
## FAQ
### Can I exclude administrators or logged-in users?
Yes. You can choose whether to count everyone, exclude administrators only, or exclude all logged-in users.
### Can I choose what to track?
Yes. You can choose which post types and page types the plugin should track.
### Where can I get support?
Support URL: https://ansico.dk/Ansico/Ansico-Stat-plugin
## Changelog
- v1.0.0: First public release.
- v1.1.0: Major update.
- v1.1.1: Lots of corrections. Now monthly statistics, yearly statistics, lifetime statistics and single page statistics.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -1,464 +1,195 @@
.ansico-stat-admin-page .ansico-stat-card {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 8px;
padding: 20px;
margin: 18px 0;
.ansico-stat-admin-page,
.ansico-stat-admin-wrap { color:#1e293b; }
.ansico-stat-cards {
display:grid;
grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
gap:16px;
margin:20px 0 24px;
}
.ansico-stat-card {
background:#fff;
border:1px solid #dcdcde;
border-radius:16px;
box-shadow:0 8px 24px rgba(15,23,42,.06);
padding:20px;
}
.ansico-stat-card-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
display:flex;
justify-content:space-between;
gap:12px;
align-items:flex-start;
margin-bottom:14px;
}
.ansico-stat-chart-wrap {
width: 100%;
overflow-x: auto;
.ansico-stat-card-header h2,
.ansico-stat-card-header h3,
.ansico-stat-card h2,
.ansico-stat-card h3 { margin:0 0 4px; }
.ansico-stat-card-header p { margin:0; color:#64748b; }
.ansico-stat-card-value {
margin:0;
font-size:28px;
line-height:1.2;
font-weight:700;
color:#0f172a;
}
.ansico-stat-chart {
width: 100%;
min-height: 160px;
display: block;
background: #fff;
.ansico-stat-chart-wrap,
.ansico-stat-bar-chart,
.ansico-stat-pie-chart,
.ansico-stat-grouped-bar-chart {
position:relative;
overflow:visible;
}
.ansico-stat-month-block {
margin-top: 24px;
}
.ansico-stat-table th,
.ansico-stat-table td {
vertical-align: top;
}
.ansico-stat-widget p {
margin-top: 0;
}
.ansico-stat-month-nav {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin: 16px 0;
}
.ansico-stat-top-list {
margin: 0 0 12px 18px;
}
.ansico-stat-top-list li {
margin-bottom: 6px;
}
.ansico-stat-two-column {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
gap: 20px;
align-items: start;
}
.ansico-stat-bar-chart-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
gap: 10px;
align-items: end;
min-height: 190px;
padding: 12px;
border: 1px solid #dcdcde;
border-radius: 8px;
background: #fff;
}
.ansico-stat-bar-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: end;
gap: 6px;
min-width: 0;
}
.ansico-stat-bar {
width: 100%;
max-width: 36px;
min-height: 4px;
border-radius: 6px 6px 0 0;
background: #2271b1;
}
.ansico-stat-bar-value {
font-size: 11px;
line-height: 1.2;
}
.ansico-stat-bar-label {
font-size: 11px;
line-height: 1.2;
text-align: center;
word-break: break-word;
}
.ansico-stat-pie-wrap {
display: grid;
grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
gap: 16px;
align-items: center;
}
.ansico-stat-pie-legend {
display: grid;
gap: 8px;
}
.ansico-stat-legend-item {
display: flex;
gap: 8px;
align-items: center;
font-size: 13px;
}
.ansico-stat-legend-swatch {
width: 12px;
height: 12px;
border-radius: 999px;
display: inline-block;
flex: 0 0 12px;
}
@media (max-width: 900px) {
.ansico-stat-two-column,
.ansico-stat-pie-wrap {
grid-template-columns: 1fr;
}
}
.ansico-stat-chart-table-wrap {
margin-top: 12px;
max-height: 240px;
overflow: auto;
border: 1px solid #dcdcde;
border-radius: 8px;
}
.ansico-stat-chart-table th,
.ansico-stat-chart-table td {
white-space: nowrap;
}
.ansico-stat-chart-wrap circle {
cursor: pointer;
}
.ansico-stat-chart-wrap {
position: relative;
max-width: 100%;
overflow-x: auto;
}
.ansico-stat-line-chart {
position: relative;
min-width: 0;
}
.ansico-stat-table {
width: 100%;
table-layout: fixed;
display: block;
overflow-x: auto;
max-width: 100%;
}
.ansico-stat-table th,
.ansico-stat-table td {
word-break: break-word;
overflow-wrap: anywhere;
}
.ansico-stat-table a {
word-break: break-all;
overflow-wrap: anywhere;
}
.ansico-stat-line-chart-enhanced svg {
display: block;
filter: drop-shadow(0 2px 10px rgba(34, 113, 177, 0.08));
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point {
transition: transform .12s ease, filter .12s ease;
cursor: pointer;
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point:hover {
transform: scale(1.08);
filter: drop-shadow(0 2px 8px rgba(34, 113, 177, 0.25));
}
.ansico-stat-pie-chart-shell {
position: relative;
}
.ansico-stat-pie-segment {
transition: opacity .12s ease, transform .12s ease;
cursor: pointer;
}
.ansico-stat-pie-segment:hover {
opacity: 0.92;
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point {
vector-effect: non-scaling-stroke;
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point-hit {
cursor: pointer;
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point-hit:focus {
outline: none;
}
.ansico-stat-line-chart-enhanced .ansico-stat-chart-point-hit {
cursor: pointer;
}
.ansico-stat-chart-wrap-enhanced {
position: relative;
padding: 10px 12px 6px;
margin: 0 -12px;
overflow: visible;
}
.ansico-stat-chart-wrap-enhanced .ansico-stat-line-chart {
overflow: visible;
}
.ansico-stat-widget-total {
margin: 0 0 8px 0;
font-size: 14px;
}
.ansico-stat-widget-chart-wrap {
margin: 0 0 10px 0;
}
#ansico-stat-widget-chart-wrap,
#ansico-stat-widget-chart {
max-width: 100%;
}
.ansico-stat-widget .ansico-stat-chart-wrap {
margin-top: 0;
}
.ansico-stat-widget .ansico-stat-chart-wrap-enhanced {
padding-top: 2px;
margin-top: 0;
}
.ansico-stat-widget .ansico-stat-line-chart-enhanced svg {
height: 260px;
}
.ansico-stat-widget-chart-wrap {
margin: -4px 0 8px 0;
}
.ansico-stat-widget .ansico-stat-chart-wrap-enhanced {
padding: 0 !important;
margin: -6px 0 0 0 !important;
}
.ansico-stat-widget {
margin-top: 0;
}
.ansico-stat-widget-total {
margin: 0 0 2px 0;
font-size: 16px;
font-weight: 600;
line-height: 1.3;
}
.ansico-stat-widget-chart-wrap {
margin: -8px 0 6px 0;
}
.ansico-stat-chart-wrap-widget {
padding: 0 !important;
margin: -10px 0 0 0 !important;
}
.ansico-stat-line-chart-widget svg {
height: 250px !important;
}
.ansico-stat-line-chart-widget .ansico-stat-chart-point {
r: 3;
}
.ansico-stat-widget .ansico-stat-top-list {
margin-top: 6px;
}
.ansico-stat-bar-chart-wrap { position: relative; }
.ansico-stat-pie-chart-shell .ansico-stat-chart-tooltip,
.ansico-stat-bar-chart-wrap .ansico-stat-chart-tooltip,
.ansico-stat-chart-wrap-enhanced
.ansico-stat-line-chart,
.ansico-stat-pie-chart-shell { overflow:visible; }
.ansico-stat-chart-tooltip {
position: absolute !important;
display: none;
opacity: 0;
background: rgba(17,24,39,0.95) !important;
color: #fff !important;
padding: 6px 8px !important;
border-radius: 6px !important;
font-size: 12px !important;
line-height: 1.2 !important;
pointer-events: none !important;
white-space: nowrap !important;
z-index: 9999 !important;
box-shadow: 0 4px 16px rgba(0,0,0,.15);
max-width: min(260px, calc(100% - 16px));
position:absolute;
z-index:9999;
pointer-events:none;
max-width:260px;
padding:8px 10px;
border-radius:10px;
background:rgba(15,23,42,.94);
color:#fff;
font-size:12px;
line-height:1.35;
box-shadow:0 10px 30px rgba(2,6,23,.28);
white-space:normal;
}
.ansico-stat-chart-wrap svg,
.ansico-stat-line-chart svg { overflow:visible; }
.ansico-single-page-shell {
max-width:1280px;
margin-right:24px;
}
.ansico-single-page-hero {
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:16px;
margin:16px 0 18px;
}
.ansico-single-page-hero h1 { margin:0 0 8px; font-size:30px; line-height:1.2; }
.ansico-single-page-hero .description { margin:0; color:#64748b; font-size:14px; }
.ansico-single-page-toolbar,
.ansico-single-page-target-card {
background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
border:1px solid #dbe4ee;
border-radius:18px;
box-shadow:0 10px 24px rgba(15,23,42,.05);
padding:18px 20px;
margin-bottom:18px;
}
.ansico-single-filter-form {
display:grid;
grid-template-columns:minmax(320px,2.4fr) repeat(2,minmax(140px,1fr)) auto;
gap:14px;
align-items:end;
}
.ansico-single-filter-field { display:flex; flex-direction:column; gap:6px; }
.ansico-single-filter-field label {
font-size:12px;
font-weight:600;
letter-spacing:.02em;
text-transform:uppercase;
color:#475569;
}
.ansico-single-filter-field input[type="url"],
.ansico-single-filter-field input[type="date"] {
width:100%;
min-height:42px;
border-radius:10px;
}
.ansico-single-filter-field-url input[type="url"] { min-width:0; }
.ansico-single-filter-actions {
display:flex;
gap:10px;
flex-wrap:wrap;
align-items:center;
}
.ansico-single-page-target-meta h2 {
margin:10px 0 6px;
font-size:22px;
}
.ansico-single-page-target-meta a {
color:#2271b1;
text-decoration:none;
word-break:break-all;
}
.ansico-single-page-target-badge {
display:inline-flex;
align-items:center;
gap:6px;
min-height:28px;
padding:0 10px;
border-radius:999px;
background:#e8f1fb;
color:#0f5b9a;
font-size:12px;
font-weight:700;
text-transform:uppercase;
letter-spacing:.03em;
}
.ansico-single-page-grid {
display:grid;
grid-template-columns:repeat(12,minmax(0,1fr));
gap:18px;
}
.ansico-single-chart-card { padding:20px; }
.ansico-single-chart-card-wide { grid-column:1 / -1; }
@media (max-width: 980px) {
.ansico-single-filter-form { grid-template-columns:1fr 1fr; }
.ansico-single-filter-field-url,
.ansico-single-filter-actions { grid-column:1 / -1; }
}
@media (max-width: 640px) {
.ansico-single-page-shell { margin-right:0; }
.ansico-single-filter-form { grid-template-columns:1fr; }
.ansico-single-filter-field-url,
.ansico-single-filter-actions { grid-column:auto; }
}
.ansico-stat-url-form-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 12px;
align-items: end;
.ansico-stat-admin-page > .ansico-stat-card {
margin: 0 0 24px;
}
.ansico-stat-url-field {
min-width: 0;
.ansico-stat-admin-page > .ansico-stat-card:last-of-type {
margin-bottom: 0;
}
.ansico-stat-url-action .button {
min-width: 110px;
.ansico-stat-two-column {
display:grid;
grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
gap:24px;
align-items:start;
}
.ansico-stat-summary-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 14px;
margin-top: 16px;
.ansico-stat-pie-wrap,
.ansico-stat-pie-chart-shell {
position:relative;
}
.ansico-stat-summary-card {
border: 1px solid #dcdcde;
border-radius: 8px;
padding: 14px;
background: #f9f9f9;
.ansico-stat-pie-wrap {
display:grid;
gap:16px;
}
.ansico-stat-summary-label {
font-size: 12px;
line-height: 1.4;
color: #50575e;
margin-bottom: 6px;
.ansico-stat-pie-chart-shell {
min-height:180px;
}
.ansico-stat-summary-value {
font-size: 28px;
line-height: 1.2;
font-weight: 600;
.ansico-stat-pie-chart-shell svg {
display:block;
overflow:visible;
}
.ansico-stat-summary-description {
font-size: 12px;
line-height: 1.4;
color: #50575e;
margin-top: 6px;
.ansico-stat-pie-legend {
display:grid;
gap:8px;
}
.ansico-stat-target-badge {
display: inline-flex;
align-items: center;
padding: 6px 10px;
border-radius: 999px;
background: #eef4fb;
color: #1d4f82;
font-size: 12px;
font-weight: 600;
.ansico-stat-legend-item {
display:flex;
align-items:flex-start;
gap:8px;
}
@media (max-width: 782px) {
.ansico-stat-url-form-row {
grid-template-columns: 1fr;
}
}
.ansico-stat-url-form-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 160px 160px auto;
gap: 12px;
align-items: end;
}
.ansico-stat-date-field input {
width: 100%;
}
.ansico-stat-dual-chart-legend {
display: flex;
gap: 18px;
flex-wrap: wrap;
margin-top: 12px;
font-size: 13px;
}
.ansico-stat-dual-chart-legend span {
display: inline-flex;
align-items: center;
gap: 8px;
}
.ansico-stat-dual-chart-swatch {
display: inline-block;
width: 22px;
height: 0;
border-top: 3px solid #2271b1;
}
.ansico-stat-dual-chart-swatch-unique {
border-top-color: #8c8f94;
border-top-style: dashed;
}
@media (max-width: 960px) {
.ansico-stat-url-form-row {
grid-template-columns: 1fr;
}
.ansico-stat-legend-swatch {
display:inline-block;
width:12px;
height:12px;
border-radius:999px;
flex:0 0 12px;
margin-top:3px;
}

View file

@ -0,0 +1,7 @@
(function(){
document.addEventListener('DOMContentLoaded', function(){
document.querySelectorAll('.ansico-stat-chart-tooltip').forEach(function(tooltip){
tooltip.setAttribute('role','tooltip');
});
});
})();

View file

@ -5,7 +5,7 @@ Tags: analytics, statistics, views, post views, dashboard
Requires at least: 6.0
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 1.1.0.1
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ -27,7 +27,6 @@ Features include:
* Device, browser, and operating system breakdowns
* Bot exclusion and logged-in user exclusion rules
* Reset statistics from the settings page
* Single page statistics page with URL-based lookup, date range filters, per-page charts, unique visitor tracking from version 1.0.0.6 forward, and a frontend admin bar shortcut
Support and documentation:
https://ansico.dk/Ansico/Ansico-Stat-plugin
@ -38,12 +37,10 @@ https://ansico.dk/Ansico/Ansico-Stat-plugin
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to `Ansico Stat Plugin` in the admin menu to configure settings and view statistics.
Or install it through Ansico plugins.
== Frequently Asked Questions ==
= Does it work without Post Views Counter? =
Yes. Ansico Stat Plugin is fully independent.
= Can I exclude administrators or logged-in users? =
Yes. You can choose whether to count everyone, exclude administrators only, or exclude all logged-in users.
@ -59,47 +56,6 @@ https://ansico.dk/Ansico/Ansico-Stat-plugin
== Changelog ==
= 1.1.0.1 =
- Added visible data points to the combined views and unique visitors chart.
- Added hover tooltips to the combined chart so each point can be read directly.
- Updated the plugin version to 1.1.0.1.
= 1.0.0.7 =
* Added date range filters and a combined views/unique visitors chart on the single page statistics screen.
* Added a frontend admin bar shortcut that opens statistics for the current page directly in wp-admin.
* Updated single-page CSV export to include the selected date range.
= 1.0.0.6 =
* Added true per-page unique visitor tracking stored per day for posts, pages, and tracked non-singular pages.
* Extended the single page statistics screen and CSV export with unique visitor metrics and charts.
= 1.0.0.5 =
* Expanded the single page statistics screen with more page-specific KPIs, weekday distribution, and period-over-period comparisons.
* Added CSV export for the selected page URL so the report can be downloaded directly from the single page statistics screen.
= 1.0.0.4 =
* Added a single page statistics admin page where you can enter a site URL and view statistics for that specific tracked page or post.
* Added per-page daily and monthly charts plus lifetime and recent-period summaries.
= 1.0.0 =
* First public release.
* Added tooltips to line, bar, and pie charts.
* Added monthly and yearly statistics pages.
* Added configurable tracking settings and frontend counter display.
== Upgrade Notice ==
= 1.0.0.7 =
Adds custom date ranges, a combined page chart, and a frontend admin bar shortcut for the current page report.
= 1.0.0.6 =
Adds true per-page unique visitor tracking for new data and shows those metrics on the single page statistics screen.
= 1.0.0.5 =
Adds more page-specific KPIs and CSV export on the single page statistics screen.
= 1.0.0.4 =
Adds a single page statistics screen with URL-based lookup.
= 1.0.0 =
First public release.
- v1.0.0: First public release.
- v1.1.0: Major update.
- v1.1.1: Lots of corrections. Now monthly statistics, yearly statistics, lifetime statistics and single page statistics.

Binary file not shown.

BIN
assets/banner-1544x500.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

Binary file not shown.

BIN
assets/icon-256x256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

61
readme.txt Normal file
View file

@ -0,0 +1,61 @@
=== Ansico Stat Plugin ===
Contributors: aphandersen
Donate link: https://ansico.dk
Tags: analytics, statistics, views, post views, dashboard
Requires at least: 6.0
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Simple WP plugin with basic website statistics.
== Description ==
Ansico Stat Plugin is a lightweight statistics plugin for WordPress that tracks views across your site and provides admin-friendly reporting in the dashboard and in dedicated statistics pages.
Features include:
* Track views for posts, pages, and selected public custom post types
* Track views for front page, posts page, archives, taxonomies, search results, and 404 pages
* Admin-only frontend view counter
* Monthly and yearly statistics pages
* Daily total views charts
* Top views by month and year
* Referral source statistics
* Device, browser, and operating system breakdowns
* Bot exclusion and logged-in user exclusion rules
* Reset statistics from the settings page
Support and documentation:
https://ansico.dk/Ansico/Ansico-Stat-plugin
== Installation ==
1. Upload the plugin folder to the `/wp-content/plugins/` directory, or upload the ZIP from the WordPress admin.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to `Ansico Stat Plugin` in the admin menu to configure settings and view statistics.
Or install it through Ansico plugins.
== Frequently Asked Questions ==
= Can I exclude administrators or logged-in users? =
Yes. You can choose whether to count everyone, exclude administrators only, or exclude all logged-in users.
= Can I choose what to track? =
Yes. You can choose which post types and page types the plugin should track.
= Where can I get support? =
Support URL:
https://ansico.dk/Ansico/Ansico-Stat-plugin
== Changelog ==
- v1.0.0: First public release.
- v1.1.0: Major update.
- v1.1.1: Lots of corrections. Now monthly statistics, yearly statistics, lifetime statistics and single page statistics.