Last updated: November 11, 2024 at 8:39 PM
We implemented detailed site statistical information that users can view using the shortcode function of the WordPress plugin "SlimStat Analytics."
SlimStat Analytics is a free analytics plugin for WordPress. This plugin tracks site traffic and user behavior and provides detailed reports. Below is SlimStat Analytics This is the main function of.
- traffic analysis: Track number of site visitors, page views, time spent, etc.
- User behavior tracking: Records which pages you visit and which links you click.
- report generation: Use graphs and charts to visually display data.
- customization: You can customize the content and display method of the report.
- SEO analysis: Track traffic from keywords and search engines.
This plugin is especially suitable for small sites and personal blogs. It is easy to set up, and even beginners can easily start using it.
The detailed functions of the plugin are as follows (quoted from the plugin official website – Version 5.2.8).
- Real-time access logs: Measure server latency, track page events, monitor bounce rates, and more.
・Shortcode: Display the report in a widget or directly in a post or page.
・GDPR: Fully compliant with GDPR European law. You can test your website at cookiebot.com.
Filters: Exclude users from statistics collection based on a variety of criteria, including user role, common bots, IP subnets, admin pages, and country.
- Export to Excel: Download reports as CSV files, generate user heatmaps, and receive daily emails in your mailbox (via Pro).
Caching: Compatible with W3 Total Cache, WP SuperCache, CloudFlare, and most caching plugins.
・Privacy: Hash IP address to protect user privacy.
Geolocation: Identify visitors by city or country, browser type, and operating system (powered by MaxMind and Browscap).
・World Map: See where your visitors are coming from, even on your mobile device (provided by amMap).
Site statistics
Site statistics compiled by SlimStat can be displayed by clicking the link ‘≫Details’ in the widget area “Site Statistics” on the left.
senris.com site statistics
A screen sample of "senris.com site statistics" displayed from the site statistics details link is shown in the gallery below. Please note that these statistical information are part of the information of SlimStat Analytics that can be disclosed.
How to implement SlimStat Analytics with shortcodes
SlimStat Analytics statistical information can be viewed by the administrator from the plugin's dashboard, but it can also be viewed by users by inserting a widget or pasting a shortcode on a fixed page.
The example below shows how to implement it by pasting shortcodes.
Slimstat shortcode structure
A typical Slimstat shortcode looks like this:
[slimstat f='criteria' w='dimension|widget_id' s='separator' o='offset']condition[/slimstat]
f
: Function to perform (count, top items, display widgets, etc.).w
: Specify the data dimension or widget ID.s
: List delimiter (optional, defaults to empty).o
: Counter offset (optional).
For more information on how to write shortcodes, see the SlimStat tutorial page Master WP Slimstat shortcodes Please refer to
SlimStat individual data display shortcode
The code below is an example of writing a shortcode to display individual data of SlimStat's statistical information "Site statistical information [Today/Yesterday]" pasted in the text widget in the widget area.
訪問者数: [slimstat f='count' w='ip']strtotime equals today[/slimstat] / [slimstat f='count' w='ip']strtotime equals yesterday[/slimstat] ([slimstat f='count' w='ip']strtotime equals now &&& interval_minutes equals -5[/slimstat] オンライン)
ページビュー数: [slimstat f='count' w='id']strtotime equals today[/slimstat] / [slimstat f='count' w='id']strtotime equals yesterday[/slimstat]
Shortcode for SlimStat widget display
The code below is an example of writing a shortcode to display a widget of SlimStat statistics pasted on a fixed page.
[slimstat f='widget' w='slim_p1_01'][/slimstat]
The above widget ID ‘slim_p1_01’ can be confirmed by hovering over the “?” mark on the SlimStat Analytics management page as shown in the example below.
For more usage examples, please see the SlimStat tutorial page. Examples of frequently used shortcodes in WP Slimstat Please refer to
About Google Analytics 4 (GA4)
Since SlimStat is just a simple access analysis plugin, we have confirmed that some of the analysis results may contain inaccurate information. In particular, there appears to be an error in the analysis of visitors by country and browser type.
For access analysis on this site, in addition to the access analysis program provided by the core server and the access analysis program developed by us using perl, we also run accurate access analysis using Google Analytics 4 (GA4) etc.
For reference, the gallery below displays access analysis screens (as of November 10, 2024) using GA4.