Sunday, September 21, 2014

How to Generate a Page View Report in SharePoint Online

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.

We got the site up and running and things were going beautifully. The client-facing site is basically 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 deliverables 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. They were very happy with the way the site functioned. 

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 and can’t 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 or terms they’re clicking on in the Managed Metadata Navigation or what deliverables the user is looking at.  However, in this case , all we needed to know was 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 Client Site, Site Settings

image

3. Go to Site Collection Administration, Audit Log Reports

image

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

image

5. 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.

image

6. Click OK. The screen will refresh and give you a confirmation message with a link. The link may not work.

image

7. After clicking on “Click here to view the report”, you may see this:

image

8. 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.

clip_image009

image

9. 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.

image

10. You should see a confirmation that the file has been downloaded with a link to open it

image

11. Click on the Report Data 1 Tab

image

12. 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.

image

13. 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

image

14. 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.

image

Cleaned up version of the report:

image