As a site owner, you can control whether people see the names of people who view files or pages on a site, as long as your organization-level sharing settings allow it.
Go to your Microsoft SharePoint site.
In the top right corner, select Settings and then select Site information.
If you don't see Site information under Settings, you don't have permission to manage the setting.
Near the bottom of the site information pane, select View all site settings.
On the Site Settings page, under Site Actions, select Manage site features.
On the Site Features page, scroll down to SharePoint Viewers, and select Activate.
After a few minutes, the viewers of files and pages on your site will begin to appear on the file card.
Note: When you turn on this setting, people who use your site will see who views files and pages, including news posts, because ASPX pages are still files. Historical data will be shown when this setting is turned on. If the feature is turned off and then back on, any views of files while the feature was off will also appear in the history.
See viewers and file activity on the file card
To see the file card, go to the document library or pages library, and point to a file or page. The file card appears next to the file.