Personally I would use Google analytics, you can call a javascript function in your template to let google analytics when a page has been visited, it can then appear in a custom Analytics report.
You could then use the API to pull out this info.
The database solution will work but you'll be writing to the DB on every page visit.
Just a small question, have I understod you correct if you are saying that you can't get Google Analytics to work in Umbraco 4.7? If not, are you getting any errors? And how did you implement it? There should be no problem regarding Google Analytics and Umrbaco 4.7 what so ever.
no I'm actually talking about just getting the most viewed nodes. Using google analytics isn't an option, I want to be able to display the most viewed nodes in realtime for the visitors. I have a FAQ part in the website and I wan't to list the most viewed FAQ's for the visitors.
I'm about to do a similar thing, and whilst I've not actually done it yet, I was thinking of just setting a numeric data type (or possibly a label data type, but I need to look into that further) on the document type in question and incrementing the value with either a user control macro on that document type or an AJAX call to /base. You could then use XSLT just to sort those nodes on that field and show only the first 5. I hope this is food for thought - let us know what you decide to do.
Most viewed nodes
Hi,
is it possible to get top 5 most viewed sub nodes(pages) for a specific node(page)?
Theres no built in functionality of it.
You should create a custom table and then make xslt extension to insert/update values.
Personally I would use Google analytics, you can call a javascript function in your template to let google analytics when a page has been visited, it can then appear in a custom Analytics report.
You could then use the API to pull out this info.
The database solution will work but you'll be writing to the DB on every page visit.
Rich
Rich, I havent found Google analytics that compatible with umbraco version 4.7, so using database solution seems the only alternative to me.
Sorry that the way I found it.
Hi Praveity.
Just a small question, have I understod you correct if you are saying that you can't get Google Analytics to work in Umbraco 4.7? If not, are you getting any errors? And how did you implement it? There should be no problem regarding Google Analytics and Umrbaco 4.7 what so ever.
/Kim A
Actually, I think he is talking about Google Analytics for Umbraco Package which is not compatible with Umbraco 4.7
However, it is still possible to use Google Analytics, but you won't have your reports inside Umbraco UI.
Hi,
no I'm actually talking about just getting the most viewed nodes. Using google analytics isn't an option, I want to be able to display the most viewed nodes in realtime for the visitors. I have a FAQ part in the website and I wan't to list the most viewed FAQ's for the visitors.
I'm about to do a similar thing, and whilst I've not actually done it yet, I was thinking of just setting a numeric data type (or possibly a label data type, but I need to look into that further) on the document type in question and incrementing the value with either a user control macro on that document type or an AJAX call to /base. You could then use XSLT just to sort those nodes on that field and show only the first 5. I hope this is food for thought - let us know what you decide to do.
@Dan, I created a small usercontrol that is included in the masterpage, still working on it though, might make it availble when I'm done
is working on a reply...