• Resolved cdserveopro

    (@cdserveopro)


    Hello,

    I want to get statistics on pages and the linked documentation in my post here gives the WPstatistics help for shortcodes.

    But The need, is to obtain the global number of page visited and I don’t find solution => the number of visit per page is not needed for me but the number global of page and the most visited page => so how to do that ?

    [wpstatistics stat=”pagevisitors” time=”total” id=”all pages”], [wpstatistics stat=”pagevisits” time=”total” id=”all pages”] is not existing…

    The notion of most visited page is not existing also.

    Is it a way to make custom code to do the addition of all the results of all shortcodes for all id “xxx” using [wpstatistics stat=”pagevisitors” time=”total” id=”xxx”] with a code that could get all the page ID’s.

    The problem is if articles are created the number of page will increase in the time.

    The last problem is the notion of id => as I use permalink without numeric id, I have only names of pages … So is it a want to use [wpstatistics stat=”pagevisitors” time=”total” id=”xxx”] with the page names and not it’s ID it seems to be impossible.

    Have you some solution to share with me for this kind of needs?

    Regards

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mehmet

    (@gandomi)

    Hello @cdserveopro,

    Thank you for your message.

    To get the global number of visits and visitors, you can use these two shortcodes:
    [wpstatistics stat=visits time=total]
    [wpstatistics stat=visitors time=total]

    These values update automatically each time the page is refreshed, so there is no issue with the data being current.

    Currently, there is no built-in shortcode for the “most visited page.” However, you may want to consider adding custom development to create a shortcode that displays this feature.

    Even though you use permalinks without numeric IDs, each page still has a unique ID in WordPress.
    To find a page’s ID:

    Go to your WordPress dashboard > Pages > All Pages.
    Hover over the page title and look at the URL that appears at the bottom of your browser.
    The number after “post=” in that URL is the page ID (for example, post=123).

    Please let me know if you need further assistance.

    Best regards,
    Mehmet

    Thread Starter cdserveopro

    (@cdserveopro)

    Hello,

    Thank you for your answers but I think there is a little difference between my search and the actual shortcodes:

    To get the global number of visits and visitors, you can use these two shortcodes:
    [wpstatistics stat=visits time=total] (1)
    [wpstatistics stat=visitors time=total] (2)

    If I understand these 2 numbers are the number of site visitor => the one counting several times if a same visitor go on the site and the second only for differents visitor id’s.

    To get the global number of visits and visitors on the page XXXX, you can use these two shortcodes:
    [wpstatistics stat=”pagevisits” time=”total” id=”XXXX”] (3)
    [wpstatistics stat=”pagevisitors” time=”total” id=”XXXX”] (4)

    But can you tell me if I’m wrong: the number total of page visited is not counted in (1) or (2) ?

    And the (3) and (4) count the number of visitor for only 1 page.

    So if I search the total number of page visited using stat parameter with visits or visitors, is it make sense ?

    Thank you for your help

    Regards

    Mehmet

    (@gandomi)

    Hello @cdserveopro,

    Thank you for your detailed message.

    To answer your first question:

    • The shortcodes [wpstatistics stat=visits time=total] and [wpstatistics stat=visitors time=total] display the total number of visits and visitors across the entire site.
    • These counts include all pages—whether it’s a post, the homepage, or any other post type.
    • So yes, the total number of page views (site-wide) is included in shortcode (1), and the total number of unique visitors site-wide is shown in shortcode (2).

    Regarding the shortcodes for specific pages:

    • [wpstatistics stat="pagevisits" time="total" id="XXXX"] and [wpstatistics stat="pagevisitors" time="total" id="XXXX"] are designed to show data for a single page only.
    • You can either use them without the id parameter (to refer to the current page), or specify a particular page ID to get stats for that page.
    • These shortcodes do not provide cumulative site stats—they are specific to one page.

    So in summary:

    • For overall site statistics, use shortcode (1) or (2).
    • For a specific page’s statistics, use pagevisits or pagevisitors.

    I hope this clears things up!
    Let us know if you have any further questions.

    Best regards,
    Mehmet

    Thread Starter cdserveopro

    (@cdserveopro)

    Thank you It’s clear for me.

    Best regards

    Cyril

    Mehmet

    (@gandomi)

    Hi Cyril,
    Thank you for your confirmation.
    I’m glad everything is clear now.

    I will go ahead and mark this ticket as resolved.

    If you have any other questions in the future, feel free to reach out.

    Best regards,
    Mehmet

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WPstatistics shortcode with free version’ is closed to new replies.