How to Display Google Analytics Page Views on Your WordPress Site
Content
Many WordPress users look for a way to showcase their site's popularity by displaying page view statistics from Google Analytics directly on a public page. This is a common request for sites displaying advertising rates, portfolios, or simply to build trust with visitors. This guide explains the current capabilities and workarounds for this functionality when using the MonsterInsights plugin.
The Core Challenge
By default, the MonsterInsights plugin is designed as a backend dashboard tool. Its primary function is to connect your site to Google Analytics and display reports within your WordPress admin area for your own analysis. It is not built to pull that data and display it publicly on the front end of your website for visitors to see.
Official Plugin Capability
Based on historical support threads, the MonsterInsights team has confirmed that their plugin does not include a feature for public display of analytics data. While they have mentioned internal plans for a potential addon to handle this in the past, no such feature has been integrated into the free version of the plugin. Attempting to use shortcodes to display active users or page views will not work, as this functionality is not provided.
Potential Workarounds and Solutions
Since the desired feature is not natively supported, here are the most common approaches users take to achieve this goal.
1. Manual Data Export from Google Analytics
The most straightforward method is to manually pull the data you need. You can log into your Google Analytics account, generate a report for the metrics you want to display (e.g., pageviews for the last month), and then manually update a page or text widget on your site with that number. The MonsterInsights team has a guide on how to export data from Google Analytics. This method is simple but requires regular manual updates to keep the numbers current.
2. Explore Other WordPress Plugins
Several other plugins in the WordPress repository are specifically designed to fetch and display Google Analytics data on the frontend. Searching for terms like "display google analytics" or "analytics shortcode" may yield plugins built for this explicit purpose. These plugins typically use the Google Analytics API to fetch data and then provide a shortcode you can insert into any page or post.
3. Custom Development
For a fully integrated and automated solution, custom development is an option. A developer can use the Google Analytics API directly to fetch specific metrics and then write code to display those values anywhere on your site. This is the most powerful and flexible solution, but it requires advanced technical skills.
Conclusion
Displaying live Google Analytics statistics on your public WordPress pages is a highly sought-after feature that is not currently offered by the free MonsterInsights plugin. Users seeking this functionality must look to alternative methods, such as manual updates, dedicated display plugins, or custom development, to achieve their goal.
Related Support Threads Support
-
Tracking Logged-in Users Page Visitshttps://wordpress.org/support/topic/tracking-logged-in-users-page-visits/
-
get the most popular postshttps://wordpress.org/support/topic/get-the-most-popular-posts/
-
Minimum requirementshttps://wordpress.org/support/topic/minimum-requirements-2/
-
Show analytics info shortcode?https://wordpress.org/support/topic/show-analytics-info-shortcode/
-
Only see stats for blog postshttps://wordpress.org/support/topic/only-see-stats-for-blog-posts/
-
Display Post or Page view in the Column Count on Page or Posts?https://wordpress.org/support/topic/display-post-or-page-view-in-the-column-count-on-page-or-posts/
-
Statistics on the frontpage of the site.https://wordpress.org/support/topic/statistics-on-the-frontpage-of-the-site/
-
Display statistics on public page?https://wordpress.org/support/topic/display-statistics-on-public-page/
-
setPageGrouphttps://wordpress.org/support/topic/setpagegroup/
-
post views from google analyticshttps://wordpress.org/support/topic/post-views-from-google-analytics-2/
-
Track social sharing activityhttps://wordpress.org/support/topic/track-social-sharing-activity/
-
Page Analysis and Word Count Breakshttps://wordpress.org/support/topic/page-analysis-and-word-count-breaks/