How to Display WP Statistics on Your Public Pages and Posts
Content
Many WordPress users want to showcase their website's performance directly to visitors or within client reports. A common question is whether the detailed charts and statistics visible in the WordPress admin dashboard can be displayed on public-facing pages. The good news is that this is entirely possible using the built-in features of the 'WP Statistics – The Most Popular Privacy-Friendly Analytics Plugin'.
Why Use Shortcodes?
The primary method for displaying statistics publicly is through shortcodes. Shortcodes are small pieces of code placed inside square brackets (e.g., [shortcode]) that you can insert into any post, page, or widget. When the page is loaded, the shortcode is automatically replaced with the live statistic it represents.
Available Shortcodes and Their Uses
The WP Statistics plugin includes a variety of shortcodes for different metrics. According to the plugin's support threads, users have successfully displayed data such as:
- Total number of visitors:
[wpstatistics stat=visitors time=total] - Number of visits for a specific page:
[wpstatistics time=month stat=pagevisits] - Yesterday's visitor count:
[wpstatistics stat=visitors time=yesterday]
For a complete list of all available shortcodes and their parameters, the 'WP Statistics – The Most Popular Privacy-Friendly Analytics Plugin' team maintains a comprehensive guide on their website.
Using Shortcodes in Page Builders
If you use a page builder like Elementor, you may not find a dedicated WP Statistics widget. However, you can still use the statistics by adding a generic "Shortcode" widget to your page and placing the desired WP Statistics shortcode inside it. Note that the data will not be visible in the editor's preview mode but will render correctly for your site's visitors.
Beyond Basic Shortcodes: Advanced Visualizations
For users looking to display more complex data visualizations and charts similar to those in the admin panel, the plugin's Advanced Widgets add-on offers more powerful options. This can provide a richer, more graphical representation of your data on public pages.
Conclusion
Displaying your site's statistics publicly is a straightforward process with WP Statistics. By leveraging shortcodes, you can integrate everything from simple visitor counts to more detailed pageview metrics directly into your content, enhancing transparency and engagement with your audience.
Related Support Threads Support
-
Shortcodes updateshttps://wordpress.org/support/topic/shortcodes-updates/
-
Reset all statistical datahttps://wordpress.org/support/topic/reset-all-statistical-data/
-
Bit.ly referrer statisticshttps://wordpress.org/support/topic/bit-ly-referrer-statistics/
-
separate analytics per langhttps://wordpress.org/support/topic/separate-analytics-per-lang/
-
Link with DIVI and some statistic display on home pagehttps://wordpress.org/support/topic/link-with-divi-and-some-statistic-display-on-home-page/
-
No statistics shown when using CMP Pluginhttps://wordpress.org/support/topic/no-statistics-shown-when-using-cmp-plugin/
-
Current Page Details Widgethttps://wordpress.org/support/topic/current-page-details-widget/
-
howto test email reporthttps://wordpress.org/support/topic/howto-test-email-report/
-
Display stats on a public page or posthttps://wordpress.org/support/topic/display-stats-on-a-public-page-or-post/
-
Feature request: wp-cli command for email reporthttps://wordpress.org/support/topic/feature-request-wp-cli-command-for-email-report/
-
Is this Elementor compatiblehttps://wordpress.org/support/topic/is-this-elementor-compatible/
-
Yearly Reporthttps://wordpress.org/support/topic/yearly-report-2/
-
How do iget clickshttps://wordpress.org/support/topic/how-do-iget-clicks/
-
Inquiry About Setting Custom Starting Visitor Count in WP Statistics Pluginhttps://wordpress.org/support/topic/inquiry-about-setting-custom-starting-visitor-count-in-wp-statistics-plugin/
-
Statistics in Pro Report – MainWPhttps://wordpress.org/support/topic/statistics-in-pro-report-mainwp/
-
WPstatistics shortcode with free versionhttps://wordpress.org/support/topic/wpstatistics-shortcode-with-free-version/
-
Need info regarding the add-onshttps://wordpress.org/support/topic/need-info-regarding-the-add-ons/
-
Can the report email sending time be changed?https://wordpress.org/support/topic/can-the-report-email-sending-time-be-changed/
-
show report in pagehttps://wordpress.org/support/topic/show-report-in-page/
-
If i purchase PRO and pay once, can I use Add-Ons lifetime?https://wordpress.org/support/topic/if-i-purchase-pro-and-pay-once-can-i-use-add-ons-lifetime/
-
wp statistics vs AMP pluginhttps://wordpress.org/support/topic/wp-statistics-vs-amp-plugin/
-
Foreign visitorshttps://wordpress.org/support/topic/foreign-visitors/
-
Instant Report or Instant Data Exporthttps://wordpress.org/support/topic/instant-report-or-instant-data-export/