Download

Documentation

Print This page

How to Display Unique Visitor Statistics in WordPress Posts

Analytify simplifies Google Analytics for WordPress users, presenting data in an easy-to-understand format on the backend, under WordPress posts/pages, and on its own dedicated dashboard. 

This article will guide you in using Analytify Advanced Shortcodes to display unique visitor website statistics, a key indicator of website traffic, in your WordPress posts. This includes the important metric of “totalUsers”, providing a comprehensive view of your audience reach.

Requirements

The Advanced Analytify Shortcode

Here is an Advance Analytify shortcode to extract and display unique visitor statistics:

The following code should be copied:

8,868

Parameters of the Shortcode

  1. metrics: Describe the kind of measure you want to show. Here, “totalUsers” represents the number of unique visitors.
  2. date_type: Establishes the data’s date range. We are using “custom” in this case, which enables us to specify a certain date range.
  3.  The start_date and end_date: This segment provides a specific date range for your data. “YYYY-MM-DD” should be used to format the dates.

The above shortcode will provide the total number of unique visitors (“totalUsers”) from Google Analytics for the specified period frame, beginning June 1, 2023, and ending July 30, 2023.

How to Implement Advance Shortcode in Your Post

Step 1: Log in to the WordPress Site.

Log in to the dashboard of your WordPress site.

Step 2: Create a New Post or Page, or Edit an Existing One.

You can make a new post or page where you want to show website unique visitor statistics.

You can also edit a post or page that is already there. For this, you need to navigate to that particular post >> edit

edit WordPress post

Step 3: Select Analytify Shortodes Block 

First, select the Analytify Shortcodes block from your post editing bar.

select analytify shortcodes

After clicking the Analytify Shortcodes block, a sidebar will open on the right side of the page, as shown below.

advance shortcode

Note: This block also generates automatic shortcodes, which only support Universal Analytics. We are working to develop a new block for GA44 support. You can contact us for GA4 equivalent shortcodes until we develop an automated solution. 

For now, let’s add the code manually provided by our developer team.

Step 4: Add the Advance Analytify Shortcode

Simply copy and paste the below code into your post after selecting the analytify shortcode block. 

8,868
unique visitors shortcode

Step 5: Publish or Update the Post/Page

After adding the shortcode, you can either publish your new page or post or click Update on a current page or post.

And you’ll get similar results as shown below.

display unique visitor website statistics

That’s it!

This is how you can easily implement/add an advance shortcode to your specific page or blog post for website unique visitor statistics. 

You may also like to check our guide on how to add the Simple shortcode on a page or post.Feel free to contact our support team in case of any queries.