function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to display the count of page views on a visualforce page ?


I have created a visualforce page that shows the lists of al the Accounts in my org. Now I have to display the count of hits this page has? I think we can create a custom object for this but since I am new to this I don't know the exact way to do this. Can anyone help me with this ?

Below is how I created the Visualforce page.

<apex:page standardController="Account" recordSetVar="accounts" sidebar="false">
    <apex:pageBlock title="List of Accounts">
        <apex:form >
          <apex:pageBlockTable value="{!accounts}" var="acct" id="list">
            <apex:column value="{!acct.Name}"/>
            <apex:column value="{!acct.type}"/>
            <apex:column value="{!acct.billingCountry}" />
            <apex:column value="{!acct.shippingCountry}"/>
            <apex:column value="{!acct.createdById}"/>
Best Answer chosen by SFDC IN

Please refer this link.

Thanks & Regards
Mukesh Kumar