Privacy-first site analytics for your LaraClassifier / JobClass site. Track page views, unique visitors, referrers, countries, browsers, platforms, search keywords, and marketing campaigns — without third-party scripts or cookies.
Page View Tracking
Automatically records every front-end page visit via middleware. No manual instrumentation required.
Unique Visitors
Privacy-friendly unique visitor tracking using hashed IP + User-Agent fingerprints. No cookies needed.
Geographic Insights
Resolve visitor IPs to countries using the core GeoIP library with pluggable drivers.
Traffic Sources
Track referrer domains and URLs to understand where your traffic comes from.
Browser & Platform
Built-in User-Agent parser detects browser, OS platform, and device type (desktop/mobile/tablet).
UTM Campaign Tracking
Automatically captures UTM parameters (source, medium, campaign, term, content) from incoming URLs.
Dashboard Widget
At-a-glance traffic metrics injected directly into the admin dashboard with trend charts.
Use Cases
Portfolio or Agency Site
You run a portfolio site and want to understand which projects attract the most attention.
- See which portfolio pages get the most views and from which countries.
- Identify top referrer domains driving traffic to your site.
- Track daily and weekly trends without relying on Google Analytics or other third-party tools.
Content-Driven Site with Blog
You publish articles and want to measure their performance over time.
- Compare page views across different time periods (7 days, 30 days, 90 days, 1 year).
- Identify the browsers and platforms your audience uses to optimize for compatibility.
- Use the device type breakdown (desktop vs. mobile vs. tablet) to prioritize responsive design efforts.
Privacy-Conscious Organization
You need basic analytics without embedding third-party tracking scripts or setting cookies.
- All data stays on your own server: no external API calls for tracking (GeoIP is optional).
- Visitor uniqueness is determined via a hashed fingerprint, not cookies or persistent identifiers.
- Configurable data retention automatically purges old records.
Requirements
- LaraClassifier / JobClass v19.0.0 or later
- PHP 8.3+
- MySQL 8.0+
Installation
Step 1: Upload the Add-on
In the admin panel, go to Admin → Extensions → Add-ons and click the Upload Add-on button. Select the add-on’s ZIP file: the system extracts it automatically and the add-on appears in the installed add-ons list.
Step 2: Activate the Add-on
Find Site Statistics in the list and click Activate. Its migrations, seeders (if any) and permissions are set up automatically.
Step 3: Configure
Navigate to Admin → Statistics → Settings to configure which visitors are tracked, data retention, and exclusion rules. See Configuration.
Purchase Code (License Key)
Site Statistics is sold as a separate product, so it has its own purchase code (license key) — distinct from the purchase code of the main application and from the one of every other add-on. You are asked for it when you activate Site Statistics in Admin panel → Add-ons.
Our products are sold on three platforms. The way you receive a purchase code depends on where you bought the product.
| Platform / Marketplace | How you get the purchase code | Where to find it again |
|---|---|---|
| bedigit.com Store In-site purchase (Shop) |
Generated automatically when the order is paid, then sent by email — either in its own license email, or inside the order confirmation email. | My Account → My Licenses on bedigit.com |
| Gumroad | Created as soon as Gumroad notifies us of the sale, then sent in a separate email, in addition to the Gumroad receipt. | The license email, your Gumroad Library, and My Account → My Licenses on bedigit.com |
| Envato Market CodeCanyon |
Issued by Envato, not by us, and never sent by email: you download it yourself from your Envato account. | Envato account → Downloads → License certificate & purchase code |
1. bedigit.com Store (in-site purchase)
- As soon as the order’s payment status becomes Paid, a license key is generated automatically for every licensed item in the order (one key per purchased unit — buying 3 units gives 3 distinct keys).
- It is emailed to the address used on the order, either in a dedicated license email or inside the order confirmation email. Check your inbox and your spam / junk folder.
- The key stays available in your account under My Account → My Licenses. Keys are masked in the list; open the license detail page to reveal and copy the full key, see the domains it is activated on, and deactivate a domain to free an activation slot.
- The matching invoice is under My Account → My Orders.
2. Gumroad
- A Gumroad purchase produces two separate emails: the Gumroad receipt (sent by Gumroad, giving access to the files) and a license key email (sent by bedigit.com) that contains your purchase code.
- The license key email is generated as soon as Gumroad notifies us of the sale, so it normally arrives within seconds of the payment. Here too, check your inbox and your spam / junk folder.
- When the Gumroad product uses Gumroad’s own license-key feature, the same key also appears in your Gumroad receipt and under Library → your purchase on gumroad.com.
- Use the same email address on bedigit.com as on Gumroad: your keys are then linked to your account automatically and listed under My Account → My Licenses, even if you register after the purchase. You can also add a Gumroad key manually from My Account → My Gumroad Licenses.
3. Envato Market (CodeCanyon)
- Envato purchase codes are issued and delivered by Envato Market, never emailed by us — so there is nothing to look for in your spam folder: you retrieve the code from your Envato account.
- Log in to your Envato / CodeCanyon account, open the Downloads page, find the item, and choose License certificate & purchase code from the Download dropdown. The code is written in that certificate.
- An Envato purchase code looks like
12345678-90ab-cdef-1234-567890abcdef(8-4-4-4-12 characters). It never changes, and renewing item support does not issue a new one. - Official Envato article: Where Is My Purchase Code?
Configuration
All settings are managed in Admin → Statistics → Settings (stored in the settings table,
group stats). Defaults come from config/stats.php.
| Setting | Description | Default |
|---|---|---|
stats_enabled |
Master switch to enable or disable page view tracking. When disabled, no new data is collected, but existing data remains accessible. | true |
stats_retention_days |
Number of days to keep raw page view data. Older records are automatically purged daily. Set to 0 to keep data indefinitely. |
90 |
stats_exclude_bots |
Exclude known bots and crawlers (Googlebot, Bingbot, etc.) from statistics. | true |
stats_exclude_admins |
Exclude logged-in admin users from being tracked. | true |
stats_track_unique |
Track unique visitors using a SHA-256 hash of IP + User-Agent (privacy-friendly, no cookies). | true |
stats_geoip_enabled |
Resolve visitor IP addresses to countries using the core GeoIP library. | true |
stats_per_page |
Number of rows shown per page in admin statistics tables. | 25 |
stats_utm_tracking_enabled |
Enable automatic capture of UTM parameters (source, medium, campaign, term, content) from incoming URLs. | true |
config/stats.php provides defaults. Database settings
(saved via the admin panel) always take precedence over config file values.
Admin: Overview Dashboard
The overview page (Statistics → Overview) provides a comprehensive snapshot of your site’s traffic.
All views accept a ?period= query parameter to change the time range.
Period Selector
A dropdown button available on all statistics pages lets you switch between time periods:
| Value | Label |
|---|---|
7d | Last 7 days |
30d | Last 30 days (default) |
90d | Last 90 days |
365d | Last 365 days |
Dashboard Widget
A traffic summary widget is automatically injected into the main admin dashboard. It displays:
- Today’s Views: total page views for the current day
- Today’s Unique Visitors: unique visitor count for the current day
- This Week’s Views: total views for the current week
- This Month’s Views: total views for the current month
- Trend indicator: percentage change vs. yesterday
- Mini chart: 30-day traffic chart (desktop) / 7-day chart (mobile)
Overview Charts & Metrics
The full overview page includes:
- Summary cards: Total Views and Unique Visitors for the selected period
- Traffic chart: stacked bar chart showing views vs. unique visitors over time
- Top 10 Pages: most viewed pages with view counts
- Top 10 Referrers: top referrer domains driving traffic
- Top 10 Countries: countries by view count
- Top 10 Browsers: browser distribution
- Device type breakdown: desktop, mobile, and tablet proportions shown as progress bars
- Top Platforms: OS distribution (Windows, macOS, Linux, Android, iOS, etc.)
Admin: Reports
Each report provides a dedicated, paginated view for a specific data dimension. All reports
support the period selector and respect the stats_per_page setting.
Pages Report
Route: Statistics → Pages
A paginated table of all tracked page paths showing:
- Rank: position by total views
- Path: the URL path (e.g.
/about,/portfolio/my-project) - Views: total page views in the selected period
- Unique Visitors: unique visitor count for that page
Referrers Report
Route: Statistics → Referrers
A paginated table of referrer domains showing:
- Rank: position by total hits
- Domain: the referring domain (e.g.
google.com,twitter.com) - Hits: number of referral visits
Countries Report
Route: Statistics → Countries
A paginated table of visitor countries showing:
- Rank: position by total views
- Country: ISO country code badge + country name
- Views: total views from that country
- Unique Visitors: unique visitors from that country
stats_geoip_enabled is set to true
and the core GeoIP library is properly configured.
Browsers Report
Route: Statistics → Browsers
A paginated table of detected browsers showing:
- Rank: position by total views
- Browser: browser name with icon (Chrome, Safari, Firefox, Edge, etc.)
- Share: percentage of total views, displayed as a progress bar
- Views: total views for that browser
Platforms Report
Route: Statistics → Platforms
A paginated table of detected operating systems showing:
- Rank: position by total views
- Platform: OS name with icon (Windows, macOS, Linux, Android, iOS, Chrome OS)
- Share: percentage of total views, displayed as a progress bar
- Views: total views for that platform
Admin: Keywords
The Keywords section (Statistics → Keywords) provides insight into how visitors find your site through UTM parameter tracking (marketing campaigns).
UTM Parameter Tracking
UTM tracking automatically captures marketing campaign parameters from incoming URLs. When a visitor arrives
via a URL containing UTM parameters (e.g., ?utm_source=newsletter&utm_campaign=spring_sale),
the data is recorded and displayed in the Keywords section.
Tracked Parameters
| Parameter | Description | Example |
|---|---|---|
utm_source |
Traffic source (required for tracking to activate) | google, newsletter, facebook |
utm_medium |
Marketing medium | cpc, email, social |
utm_campaign |
Campaign name | spring_sale, product_launch |
utm_term |
Search term or keyword | web+design, laravel+cms |
utm_content |
Ad or link variant (for A/B testing) | banner_v1, sidebar_link |
Reports
UTM data is available in two dedicated tabs within the Keywords section:
- UTM Terms: shows all tracked
utm_termvalues with visit counts, sources, and landing pages - UTM Campaigns: shows all tracked
utm_campaignvalues with visit counts, sources, and mediums
The overview page also shows summary cards with total UTM visits and unique UTM visitors for the selected period.
utm_source is present in the URL, a record is created in the stats_utm_visits table
and daily aggregates are updated in stats_utm_daily. No cookies or JavaScript are involved.
Admin: Settings
The settings page (Statistics → Settings) is organized into four sections:
Tracking Options
Toggle switches for controlling what data is collected:
- Enable Tracking: master switch to start/stop data collection
- Track Unique Visitors: enable SHA-256 fingerprint-based unique visitor tracking
- Enable Country Detection: resolve IPs to countries via GeoIP
- Exclude Bots: filter out known crawlers and bots
- Exclude Admin Users: don’t track logged-in admin users
Data Management
- Data Retention: dropdown to select retention period (Unlimited, 30, 60, 90, 180, 365, or 730 days)
- Items Per Page: dropdown to select pagination size (10, 15, 25, 50, or 100 items)
UTM Tracking
Toggle to enable or disable automatic capture of UTM parameters from incoming URLs. When enabled,
the tracking middleware extracts utm_source, utm_medium, utm_campaign,
utm_term, and utm_content from visitor URLs.
Privacy Notice
An informational box reminding administrators that the add-on is privacy-friendly: no third-party scripts, no cookies, and all visitor fingerprints are hashed.
Updating
There are two ways to update this add-on: via the admin panel (recommended) or manually replacing files.
Method 1: Admin Panel Upload (Recommended)
- Download the latest
.zipfile of this add-on. - Go to Admin panel → Add-ons and click the Upload button.
- Select or drag the
.zipfile into the upload area. - A confirmation prompt will show the current and new version numbers. Click Replace to proceed.
- Go to Admin panel → System Update (
/admin/update) to apply any pending database migrations.
Method 2: Manual File Replacement
Step 1: Replace Files
Replace the add-on directory with the new version.
Step 2: Run Migrations
php artisan migrate
Pending migrations run once, so the command is safe to repeat.
Step 3: Clear Caches
php artisan config:clear
php artisan route:clear
php artisan view:clear
Step 4: Verify
Visit Statistics → Overview and confirm that data is displaying correctly. Check the settings page to verify your configuration is preserved.
Uninstallation
Switching an add-on off without losing anything is a deactivation: go to Admin panel → Add-ons, find Site Statistics and click Deactivate.
- Its routes, views, admin menu entries and permissions stop being registered, and its front-end pages stop answering.
- Its database tables and all the data they hold are kept, and its files stay under
extensions/addons/stats/. Nothing is deleted. - The purchase code recorded at activation is kept too, so activating the add-on again does not ask for it.
- Deactivation is refused while another active add-on depends on this one: deactivate that add-on first.
Click Activate on the same card to switch it back on. Pending migrations are re-run, assets are republished, and the add-on picks up exactly where it left off.
Removing
Removing is permanent and destroys the add-on's data. The Remove button only appears on a deactivated add-on, so removal is always two steps:
- Deactivate Site Statistics (see Uninstallation).
- Click Remove on its card and confirm the prompt.
The admin panel then, in one pass:
- runs the add-on's uninstall hook, if it ships one, while its code is still on disk;
- revokes the permissions declared in its
addon.json; - rolls back its migrations — this drops its database tables and every row they hold — and purges its entries from the
migrationstable, so a later reinstall migrates from scratch; - deletes its published assets:
public/addons/stats/,public/vendor/stats/andstorage/app/public/addons/stats/; - deletes the add-on directory
extensions/addons/stats/; - deletes its row in the
addonstable (the recorded purchase code goes with it) and clears the application cache.
Removal is refused, with an explanatory message and before anything is destroyed, when the add-on is still active, when another active add-on depends on it, or when the web server (PHP) user cannot delete extensions/addons/stats/. In that last case, give that user write permission on the directory and on its parent, then try again.
Deleting the folder over FTP or SSH is not equivalent: the add-on's tables, its entries in the migrations table and its addons row are all left behind, and its card stays in the list. Use Remove in the admin panel instead.
Troubleshooting
No data is being recorded
- Check that
stats_enabledis set totruein Statistics → Settings. - Verify the add-on is activated in Admin → Add-ons.
- If you are logged in as an admin, check that
stats_exclude_adminsis not enabled (or test in a private/incognito browser window). - Ensure the migrations have been run (
php artisan migrate): thestats_page_viewstable must exist.
Country data is missing or shows “Unknown”
- Verify
stats_geoip_enabledistrue. - Check that the core GeoIP driver is configured correctly in Admin → Settings → GeoIP.
- Local/private IPs (127.0.0.1, 192.168.x.x, etc.) cannot be resolved and will show as unknown.
- If using an API-based GeoIP driver, check that the API key is valid and has not exceeded rate limits.
- For production, consider using the MaxMind Database driver (
maxmind_database) with theGeoLite2-City.mmdbfile for reliable offline lookups.
Dashboard widget is not showing
- The widget is injected via a view composer. Ensure the add-on is active and the ServiceProvider has booted.
- Clear the view cache:
php artisan view:clear. - Verify the user has the
stats.viewpermission.
Statistics pages show “No data available”
- If the add-on was just installed, wait for some front-end traffic to be recorded.
- Try changing the period selector to a wider range (e.g. 90 days or 365 days).
- Check if data retention has purged older records: adjust
stats_retention_daysif needed.
Bot traffic is inflating statistics
- Enable
stats_exclude_botsin settings. This filters out 30+ known bot patterns. - Note that some bots use legitimate-looking User-Agent strings and may not be detected.
Review the
stats_page_viewstable’sis_botcolumn to audit.
UTM data is not being recorded
- Check that
stats_utm_tracking_enabledis set totruein Statistics → Settings. - UTM tracking requires at minimum the
utm_sourceparameter in the URL. URLs withoututm_sourceare ignored. - Verify URLs contain valid UTM parameters:
?utm_source=test&utm_term=keyword. - The main stats tracking must also be enabled (
stats_enabled) for UTM tracking to work.
High database storage usage
- Reduce the
stats_retention_dayssetting to a shorter period. - The daily scheduled task at 3:00 AM automatically purges old data. Ensure your Laravel scheduler
is running:
php artisan schedule:work(or configured via cron). - The
stats_page_viewstable grows fastest. Aggregate tables (stats_daily, etc.) are much smaller since they store one row per dimension per day.
Performance concerns with high traffic
- The middleware processes asynchronously after the response is sent: it does not add latency to page loads.
- All statistics queries use aggregate tables with proper indexes, not the raw
stats_page_viewstable. - For very high traffic sites, consider reducing retention to 30 days and using the offline MaxMind GeoIP driver to avoid external API calls.
Site Statistics v1.0.0: A LaraClassifier / JobClass add-on.
© BeDigit. All rights reserved.