Is there a way to find out the users who have accessed a specific visualforce page?

I think Google analytics is a way to do this(?),but I have not tracked down the page to monitor who accessed the page. Is there any out of the box/black box feature that will help me know who has accessed a page from the time it was introduced to the present day?

Thanks a lot!!!


I don't think there is any built-in resource to do this.

You can easily create your own tracking mechanism. Create an object, let's say VF_Tracking__c, that has a lookup(User) User__c, text(255) VF_Page_Visited__c, and dateTime Datetime_Visited__c plus anything else you want to track.

In your Visualforce controller, create a pageReference method to track who visits the page, and use it in the Action parameter in the apex:page compenent in your VF page.



public class myVFController{

    public pageReference trackVisits(){
        VF_Tracking__c newTracking = new VF_Tracking__c(User__c=UserInfo.getUserId(),VF_Page_Visited__c='myVFPage',Datetime_Visited__c=datetime.now());
        insert newTracking;
        return null;
    }//END trackVisits

}//END class

VF Page (called "myVFPage")

<apex:page action="{!trackVisits}">

  • I want to know who have visited in the past and I am not concerned about the future visits. Though this solution is awesome it does not help me :(. Thanks for your inputs :) – Rao Jul 30 '13 at 19:38
  • Ya, there's no solution for looking back, but you can always implement some code today and be able to answer this question in the future – Scott Pelak Jul 31 '13 at 18:44
  • I checked with customer success and have confirmed that even internally we don't have a method of tracking VF page usage per user. My one suggestion to the above idea is to make this a custom component so you can just drop it onto any VF page and track that page where needed. – pchittum Jan 6 '14 at 15:36

you can definitely build a quick custom solution for tracking the page usage using a custom object and some apex coding. But as far as i know there is no OOB solution for tracking this.


There is no feature available that will provide you with historical tracking data. Unless you've had a system in place you can't get data from it, and I've never heard of such a feature being available even internally to Salesforce.com.

The best option is to get tracking in place now rather than later, either using a tool like Google Analytics or a custom one using a quick change to the controller (might be best since you can track users easily across sessions etc.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.