1

I have created a SPA within a content editor. I now need to track clicks and page views statistics. The site cannot use any 3. Party tools, so it needs to stay within this SP solution. I'm thinking this can be done with lists, but has anyone done something like this before? I'm looking for list setup and approaches. :) Thanks in advance.

Extra info: there would properly be arround 10.000 people using this site.

Update: Sorry for these missing information. I only have access to create webparts and manage list. So only frontend code. I cannot change masterpages, run server-side code or anything like that.

In my SPA, I have a number of elements(divs and span) that I eould like to track clicks on. It seems, that based on the answers its possible to use a statistics webpart to track all the page views. But how can I track clicks on my elements? My first thought was to use the REST API to update a list with the clicks, but since there will be around 10.000 users clickin on it. I need to have timestamp on each click. Having the username for click is only nice-2-have.

4 Answers 4

1

Please Check these Links

http://hitcounter.codeplex.com/

http://code.msdn.microsoft.com/Create-Custom-hit-counter-d68d9e52

Also You can use inbuilt SharePoint 2010 web analytic feature,where you will get "Total Number of Page Views".

Go to site Action -> site settings and check for

Site Web Analytics reports

Site Collection Web Analytics reports

1
  • Sorry for not providing enough information. Please see mu update on the question. Jun 22, 2017 at 7:10
1

For SharePoint 2010 you can use Web Analytics web parts. These will help you to get no. of page views, their graphical representations and many more anlaytics. And you can add this web part to your SPA.

This MSDN Blog will help you to set up web analytics for SP2010

Update: As per your explanation

My first thought was to use the REST API to update a list with the clicks, but since there will be around 10.000 users clickin on it. I need to have timestamp on each click. Having the username for click is only nice-2-have

Doing all these stuffs all by yourself (custom) will lead to more & more complexity as "How will you manage multiple clicks by user? happened on same date? how many HTML elements you will be tracking for SPA? storing all Users alongside their valid clicks?And you said 10,000+ users?....etc etc."

I suggest, it is better to you use web analytics feature of SP 2010. you can modify your analytics result sets easily.

7
  • Sorry for not providing enough information. Please see mu update on the question. Jun 22, 2017 at 7:10
  • Ohhh. so clearly you can not deploy and custom sandbox solution code. But you have to enable services on your environment for web analytics. you can ask your IT admin to do so.. Refernce: habaneroconsulting.com/insights/…
    – DvG
    Jun 22, 2017 at 7:16
  • It will take more than a month :( but thanks! I will let them know :) Jun 22, 2017 at 7:18
  • check my answer updates
    – DvG
    Jun 22, 2017 at 7:26
  • I totally agree with you! But can I - with the access I got - use the web part analytics feature to track clicks on my divs and buttons? Jun 22, 2017 at 7:50
1

SPAs are complicated, and since all the action within a SPA takes place in the browser, you're going to have to implement a client side solution to meet the requirement. Server-side analytics are not going to do anything except track when your app is loaded from the server.

Lists are a bad option in my opinion because they don't scale well, and you're going to have hundreds of thousands, or perhaps millions, of entries in a short amount of time.

I've had success with Azure Application Insights on a project similar to yours. You can log trace messages on custom events and report on them in a lot of different ways. I'd push back hard on the restriction on third party tools for this; it just makes zero sense to roll your own analytics solution. App Insights costs in the single digits of dollars per month on the project I implemented it for. You could spend weeks developing a solution that won't even begin to approach the same level of functionality.

0

Web analytics would do but in our farm due to performance issues we have turned it off. So in such cases, i used WebLog Expert tool, it reads all your IIS logs and gives you a consolidated report from which you can pick the views etc. For free version it gives you HTML report, for paid version it gives PDF report and few other additional features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.