What would be the best way to add a hit counter to a blogpost using the Blog4Umbraco package. I think it would be nice if users who visit the blog could see how many times the specific post had been visited.
As a long-lasting solution I would attach the site to some available web analitics system (e.g. google analitics) and get the data into your pages straight from it. You won't invent a wheel and you will be able to access lot more details about your site traffic.
Thanks Rodion for the quick response. The reason I need to save how many times the page is visited is to make a 'popular-posts'-section on the site. How can I get the information stored by Google and use that information in, for example, a usercontrol or a xslt macro? (I never used Google Analytics)
Afaik, there's google analitics API that allows to extract analitics data by simple http GET queries: http://code.google.com/apis/analytics/docs/gdata/home.html, I haven't yet investigated it in details, but if it works the way I presume then it should be not hard to integrate it to an umbraco xslt macro with the library.GetXmlDocumentByUrl method and subsequential transform.
Blog4Umbraco hit counter
Hi
What would be the best way to add a hit counter to a blogpost using the Blog4Umbraco package. I think it would be nice if users who visit the blog could see how many times the specific post had been visited.
Thanks,
Thijs
As a long-lasting solution I would attach the site to some available web analitics system (e.g. google analitics) and get the data into your pages straight from it. You won't invent a wheel and you will be able to access lot more details about your site traffic.
Thanks Rodion for the quick response. The reason I need to save how many times the page is visited is to make a 'popular-posts'-section on the site. How can I get the information stored by Google and use that information in, for example, a usercontrol or a xslt macro? (I never used Google Analytics)
Afaik, there's google analitics API that allows to extract analitics data by simple http GET queries: http://code.google.com/apis/analytics/docs/gdata/home.html, I haven't yet investigated it in details, but if it works the way I presume then it should be not hard to integrate it to an umbraco xslt macro with the library.GetXmlDocumentByUrl method and subsequential transform.
Ok thanks!
Edit: I used this post to implement a web usercontrol which showed me the number of hits
is working on a reply...