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
SFDC INSFDC IN 

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

Hi,

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}"/>
          </apex:pageBlockTable>
        </apex:form>
      </apex:pageBlock>
</apex:page>
 
Best Answer chosen by SFDC IN
Mukesh_SfdcDevMukesh_SfdcDev
Hi,

Please refer this link.
https://developer.salesforce.com/forums/?id=906F0000000MN6KIAW

Thanks & Regards
Mukesh Kumar