Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Show Real Time Online Users in WordPress (Easy Way)

Knowing how many people visit your WordPress site in real-time can be extremely useful. It provides interesting insights into user behavior and engagement.

You can see which pages users view, where they are from, and how they interact with your content. This information helps you tailor content pieces to your audience’s preferences, especially if you write a lot of articles, as we do at WPBeginner.

If you run an online store, it can also help you decide when to run limited-time sales or launch new products. This makes it an easy way to boost your eCommerce profits.

In this article, we will guide you on how to show real-time online users in WordPress.

How to show real time online users in WordPress

Why Track Real-Time Online Users?

Tracking online users in real-time allows you to monitor your WordPress website’s activity. You get up-to-the-minute updates about how people are using your website.

For instance, let’s say you’re running a 24-hour flash sale for your online store.

Tracking real-time users will help you see how your campaign is performing and whether it’s driving traffic to your site. It also helps you see the immediate effects of social media campaigns like tweets and Instagram posts on traffic.

Realtime report in GA4

You can even use real-time reports to monitor web traffic after making changes to your site, such as changing your WordPress theme or performing a full site redirect.

Besides that, keeping an eye on real-time online users at different intervals can help you find the best time to publish blog posts.

You can even see the most active users from different countries at different times. This can help you run targeted promotional campaigns based on your users’ locations to drive more conversions and sales.

On top of all that, seeing the number of active users on a website can show visitors that the site is popular and trusted by others.

This kind of social proof can make the site seem more credible and help new visitors feel more confident about checking out the content, buying products, or sharing their personal info.

With that in mind, we’ll share how to show real-time online users in your WordPress dashboard and on your site’s front end. Here’s a quick overview of all the methods we’ll cover in this guide:

Ready? Let’s get started.

Method 1. Showing Real-Time Online Users in WordPress Dashboard

The best way to show real-time online users in the WordPress dashboard is by using the MonsterInsights plugin.

It’s the best analytics solution for WordPress for properly setting up Google Analytics in WordPress without editing code. It helps you see how your site is performing at a glance, and shows online users in real time inside your WordPress dashboard.

MonsterInsights

We’ll be using the MonsterInsights Pro license for this tutorial because it includes real-time dashboard reports.

Plus, it has other advanced tracking features, such as eCommerce tracking and form conversions.

There is also a MonsterInsights Lite version that you can use for free. It allows you to add Google Analytics to your site and helps you to track outbound links, downloads, and more, but it doesn’t allow you to see real-time online users in WordPress.

First, let’s install and activate the MonsterInsights plugin. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, you’ll be taken to the MonsterInsights welcome screen, where you will see ‘Insights’ in your WordPress admin menu. Simply click the ‘Launch the Wizard’ button to configure Google Analytics on your website.

Launch setup wizard

Next, you can follow the steps shown by the wizard and connect MonsterInsights with Google Analytics. For more details, please see our tutorial on how to install Google Analytics in WordPress.

Once you’ve set up MonsterInsights and added Google Analytics, you can now view real-time online users in WordPress.

Simply head over to Insights » Reports from your WordPress admin panel, and then click on the ‘Realtime’ tab.

View real-time report in MonsterInsights

You’ll see how many active users are on your site and the page views per minute.

Next, go ahead and scroll down to see more real-time reports.

For instance, MonsterInsights shows which pages your visitors are viewing at that very moment. This helps you see what type of content your audience prefers during the day so you can create similar content and publish it at the right time.

Realtime top pages report

After that, you can see the report on the top referral traffic sources. It shows where your users are coming from, which campaign they are seeing, and the total number of online users.

Using this report, you can measure the performance of your marketing campaigns in real time.

Realtime top referral report

Lastly, MonsterInsights shows real-time online users from different countries and cities.

You can use data from this report to create personalized campaigns for people from different locations. For example, you can offer exclusive discounts for people from Australia or provide a buy 1 get 1 free deal for customers from India.

Realtime top country and city report

Method 2. Display Real-Time Users on WordPress Website Front End

The easiest way to show the number of people online on your website’s front end is to use the WP-UserOnline plugin.

The first thing you need to do is install and activate the WP-UserOnline plugin. For more details, please see our guide on how to install a WordPress plugin.

Upon activation, you need to visit the Settings » UserOnline page from the WordPress admin panel to configure the plugin settings.

Configure WP UserOnline settings

On this page, you can change the default plugin settings, which include time out, the user’s online page URL, and display settings.

The default settings would work for most sites, so you need to just click on the save settings button at the bottom of the page.

The next step is to create the page on your WordPress site where you want to showcase the users who are online right now. To do so, simply navigate to Pages » Add New from your WordPress dashboard.

After that, you need to add the following shortcode where you want to display real-time online users:

[page_useronline]

You can also add a shortcode block by clicking the ‘+’ sign at the top and paste the shortcode there.

Add a shortcode block

Next, you can preview your page and then publish it.

Now, when you visit your WordPress blog page, it will show you real-time online users on the front end.

View real-time user in front end

Besides that, if you use a classic theme, you can also show real-time online users in your WordPress widgets area, like the sidebar.

Simply go to Appearance » Widgets from your WordPress dashboard. Then, you can click the ‘+’ sign to add the ‘UserOnline’ widget block.

Add widget block

Next, you can rename the title for the real-time widget that will appear on your site.

There’s also an option to choose which statistic to show in the widget. By default, it will show ‘Users Online Count,’ but you can click the dropdown menu under ‘Statistics Type’ and choose a different option.

For example, you can show how many users are browsing the current page and how many users are browsing your site. You can also select a combination of these options.

Choose the statistic type

When you’re done, don’t forget to update the widgets page.

You can now visit your website to see real-time online users on your site’s sidebar.

Real time users preview in sidebar

Note: Not all WordPress classic themes come with a sidebar feature. So, we recommend checking a theme’s documentation or settings to see how you can customize or enable sidebars before making your choice.

Method 3. Seeing Real-Time Online Users in Google Analytics

MonsterInsights makes it super simple to see real-time stats inside WordPress, as you don’t have to leave your website.

Plus, it shows the data that matters for your business and helps uncover insights to grow it.

However, visiting your Google Analytics account is another way to see real-time online users.

View Real-Time Online Users in Google Analytics 4

Google Analytics 4, or GA4, is the latest version of the analytics tool. It has a different reporting interface and comes with new metrics and features.

To see real-time online users in GA4, you’ll want to go to Reports » Realtime from the menu on your left.

Realtime report in GA4

You can see all the stats under a single ‘Realtime’ report.

For example, Google Analytics 4 shows which sources are generating the most traffic right now, which pages your online users are viewing, which device they’re using, where they are from, and more.

Universal Analytics Deprecation Updates

Universal Analytics is the classic version of Google Analytics, and starting July 1, 2024, you may no longer access your Universal Analytics data.

Most users have lost access to the interface and API. Some properties might take a bit longer, but anything still visible after July 1 has a banner saying it’s set for deletion.

If you’re using Universal Analytics 360 with BigQuery backfill started before June 30, 2024, it will continue running until it is finished.

Basically, after July 1, 2024, if your property is gone from the interface, it’s considered shut down.

Bonus Tip: Displaying a User’s IP Address in WordPress

An IP (Internet Protocol) address is a unique set of numbers identifying a device on a network, like a smartphone or computer.

Users might need to know their IP addresses to set up certain types of software, including WordPress security plugins like firewalls. So, if you sell such software, displaying the user’s IP address in your documentation can assist customers in the setup process.

Even if you don’t sell the software, displaying the user’s IP address in your tutorials can enhance the quality and helpfulness of your guides. This is especially useful for bloggers who often write about third-party software guides.

One of the best ways to do this is by using WPCode. All you have to do is copy and paste a custom snippet code into its editor, and the plugin will add the functionality to your WordPress site. All without the risk of breaking it.

Displaying IP address using WPCode

For more details, you can read our guide on how to display a user’s IP address in WordPress.

In addition to that, you can use WPCode to add more functionalities to your WordPress site.

For example, you can add a custom snippet code to remove your WordPress version number for extra security, display the last updated date of your posts to let users know they’re up-to-date, and more.

We hope this article helped you learn how to show real-time online users in WordPress. You may also want to see our guides on how to add a user role label next to comments and how to restrict WordPress pages by user role.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

6 CommentsLeave a Reply

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Gerhard

    Hi there

    Would it be possible if I use this plugin on 2 different sites and want to display the combined total of users on both the sites.

    Thanks

    • WPBeginner Support

      You would need to reach out to the plugin’s support for if that is available but not likely at the moment an option for two sites

      Admin

  3. Niki

    Is there a way or an addon to set different colors for each user category ?

  4. Jeff

    What I don’t like about this widget/plugin is the output when you click on the link the widget displays. E.g., right now it shows “Useronline” and “1 User Online.” The 1 Useronline is a link anyone can click, the it takes you to a page showing:

    “Users Online Right Now

    There is 1 User online now: 1 Member, 0 Guests and 0 Bots.

    Most users ever online were 1, on May 17, 2015 @ 7:19 pm
    1 Member Online Now

    #1 – Mr. and Mrs. Tango xx.xx.16.222 on May 17, 2015 @ 7:33 pm
    Two or More To Tango » Archive Users Online Right Now – Two or More To Tango [url] [referral]

    (I XXed out the IP address.) I don’t think I want everyone being able to see all of that info.

    • WPBeginner Support

      Jeff contact the plugin author. We are sure if there is enough interest, they would want to extend the plugin in future versions.

      Admin

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.