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.

http://office.microsoft.com/en-us/sharepoint-help/view-audit-log-reports-HA102772739.aspx

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

  1. Review Past Page Views on client-facing site
  2. Navigate to the Site, Site Settings
O365 Site Settings

O365 Site Settings

  1. Go to Site Collection Administration, Audit Log Reports
O365 Audit Log Reports

O365 Audit Log Reports

  1. Scroll to the bottom of the list of reports and select “Run a Custom Report”
O365 Run a Custom Report

O365 Run a Custom Report

 

  1. 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.
O365 Run a Custom Report Not Working

O365 Run a Custom Report Not Working

  1. Click OK.  The screen will refresh and give you a confirmation message with a link.  The link may not work.
O365 Operation Completed Successfully

O365 Operation Completed Successfully

  1. After clicking on “Click here to view the report, you may see this:
O365 Something Went Wrong

O365 Something Went Wrong

 

  1. 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.
O365 Site Contents

O365 Site Contents

 

O365 Download Report

O365 Download Report

  1. 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.
O365 Save As from Downloaded file

O365 Save As from Downloaded file

 

  1. You should see a confirmation that the file has been downloaded with a link to open it
O365 Downloaded File Confirmation

O365 Downloaded File Confirmation

 

  1. Click on the Report Data 1 Tab
Excel Report Data Tab

Excel Report Data Tab

 

  1. 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.
Excel Format Date

Excel Format Date

  1. 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
Excel View Report

Excel View Report

 

  1. 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.
Excel Cleaning Up Report

Excel Cleaning Up Report

 

Cleaned up version of the report:

Excel Cleaned Up Version of the Report

Excel Cleaned Up Version of the Report