Download

Documentation

Print This page

How to Get the Number of Pageviews in the Last 30 Days

Analytify is a powerful WordPress plugin that provides analytics about your website performance from Google Analytics. With its easy-to-use interface and shortcodes, you can quickly get the important data like your site’s page views, user count, bounce rates, and more. This guide will show you how to use an Analytify shortcode to find out the number of page views of your website in the last 30 days.

Requirements

Procedure

Step1: Login 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 how many pageviews you’ve had.

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

edit post

Step 3: Select Analytify Shortodes Block

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

analytify shortcode block.png

 A sidebar will open on the right side of the page. 


Step 4: Add the Analytify Shortcode

In the editor, you should add the following Analytify shortcode to get the number of page views.

I. Use the following Shortcode to get the number of pageviews of the current page or post in the last 30 days.

II. To show the pageviews of the full site, use the below Shortcode.

  • ga:pageviews: This is the metric, the measure you want to get, which is the number of pageviews in this case.
  • date_type=”30days”: This specifies the start date for the data collection. In this case, we are retrieving data from 30 days ago.
code to get pageviews

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.

Once the page is live, the shortcode will get the number of pageviews from the last 30 days and show it on your post or page.

Now you know how to use the Analytify shortcode to show the number of pageviews for the last 30 days on the pages or posts of your WordPress site.

This is a great way to track site’s performance and make data-driven strategies for content creation and site improvements.

However, you may also like to read How to Add Advance Shortcode on Post or Page.

Note: The above-mentioned shortcodes 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. 

Feel free to contact our support team.