Archive: Page Views in 0365 SharePoint Online
This article was originally written in September 2014. It is being reposted here as an archive.
I worked on a project where I created an “ad hoc” catalog. The client wanted to have a Document Center that is private to them, where they can publish deliverables, such as Word and Excel documents, but have them displayed on a page in a separate site collection that their client has access to.
We created a Document Center, added a Document Library and checked the box to make the library a catalog…which means, users can have access to the content, without having to give users access to the source library. Ben Niaulin does an excellent job of explaining what it is and how to do it here. http://en.share-gate.com/blog/migrate-sharepoint-2013-what-is-product-catalog .
The client-facing site is 1 landing page with introductory text and links, and 1 page with 4 Search web parts (1 Search Results Web Part and 3 Content Search Web Parts) and uses Managed Navigation to determine what should be displayed on the page. As a user clicks on a term in the navigation, the page refreshes to display items that are tagged with that term.
We got the site up and running and things were going beautifully. Then my client asked for a report to see how many times their client has accessed the site. Great! I know that SharePoint 2013 has a content viewing report that I can quickly run and get my client the information they need.
Unfortunately, I found out the hard way, that this function does not work in SharePoint Online.
Available audit log reports
Content viewing Reports users who have viewed content on a site. In SharePoint Online, this report will be blank as these events are not captured during auditing.
Argh! Trying to figure out what I CAN report on, I discovered that what I CAN do, is run a report that tells me how many times a Search Query was run. Every time a user opens the Deliverables Page, four search queries are run, one for each Search web part on the page. All I need to do is group the 4 “events” as one and that will tell me how many times the user has opened the page.
The downfall is, that I can’t tell “which” documents the user is looking at, but we just needed to know that the client was opening the site at all, which this report told us they were not.
Instructions to Generate a Deliverables Page View Report
- Review Past Page Views on client-facing site
- Navigate to the Site, Site Settings
- Go to Site Collection Administration, Audit Log Reports
- Scroll to the bottom of the list of reports and select “Run a Custom Report”
- Select a folder in the SharePoint site to save the report to, select your dates, users and select the option for “Searching site content”. You can also select the “Opening or downloading documents…”, but it does not currently work in SharePoint Online.
- Click OK. The screen will refresh and give you a confirmation message with a link. The link may not work.
- After clicking on “Click here to view the report, you may see this:
- If it does not, navigate to the folder you saved the report to in the previous step, right click on it and “Download a Copy”. Then open Excel and open the report.
- At the bottom of your screen, you will see an option to save the file, which will copy it to your c:/downloads folder, or you can click on the Arrow next to “Save” and select “Save As” to choose your own location.
- You should see a confirmation that the file has been downloaded with a link to open it
- Click on the Report Data 1 Tab
- Change the format of the “Occurred (GMT)” column to US Date with Time (US is the only one that will allow both Date and Time, which is very important for the next steps.
- Because the page has four search web parts on it, every time a user opens it, he or she will generate 4 search “events” that are logged on the report. So 4 lines = one page view each time the page is loaded or refreshed on my page. Your number will be different if you have a different number of search web parts on the page. In my example, I can delete the 2nd through 4th of each duplicated item with the same time stamp.
- Be careful though, if there are 8 during the same time, the user navigated to another term within the same 60 seconds
- Additional clean up includes hiding columns that are not needed and using Ctrl+F to Find and Replace everything within the <*> to remove the userID information to leave the nice formatted name in the User Id Column.