Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thijs 97 posts 117 karma points
    Oct 13, 2011 @ 15:37
    Thijs
    0

    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

  • Rodion Novoselov 694 posts 859 karma points
    Oct 13, 2011 @ 15:51
    Rodion Novoselov
    0

    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.

  • Thijs 97 posts 117 karma points
    Oct 13, 2011 @ 15:55
    Thijs
    0

    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)

  • Rodion Novoselov 694 posts 859 karma points
    Oct 13, 2011 @ 20:09
    Rodion Novoselov
    0

    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.

  • Thijs 97 posts 117 karma points
    Oct 14, 2011 @ 09:16
    Thijs
    0

    Ok thanks!

    Edit: I used this post to implement a web usercontrol which showed me the number of hits

     

     

     

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies