
Requirement: The requirement is to be able to track which Salesforce Page Views the users use the most in order for the business to understand any kind of Salesforce adoption. Regulatory businesses may also require this for various audit purposes.
For those who are not aware when you embed Salesforce Screen flows in lightning, these always run on a page load. What I am going to build below is a screen flow which will create a record every time the page loads. The flow will also populate the Date, Time and the user who loaded the page.
Step 1: Create a Custom object and name it “Page View”.
Step 2: Create the following fields.
- Date (Date Type=Date/Time)
- User – Lookup to User
- Opportunity – Lookup to Opportunity object (Please note that if you want to add the Page Layout to other object you will need to add other lookup fields (e.g. Accounts or Leads or any other standard/custom objects)

Step 3: Build the screen flow
- First of all create an id variable

- Create the “Create” element

- Create the Screen element

- Save and activate the flow
Video Demo
Based on the page views reports can be created on who viewed what.