Copied to clipboard

Flag this post as spam?

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


  • Andrew Clarke 6 posts 26 karma points
    Aug 17, 2014 @ 09:21
    Andrew Clarke
    0

    Page View Counter

    Hi All,

    After a bit of advice here (am relatively new to Umbraco).

    I'm trying to show a list of most viewed pages for a project I am currently working on. After doing a bit of research it seems that there is no "counter" for pages included in the core.

    There was mention in a few posts to just use Google Analytics API. This is not an issue and pretty easy to do. And adding a custom property on a document type is not an option as from what I understand I would need to publish the page every time I want to increment the counter.

    So, I have created my own database table for storing "views" against a node (using Entity Framework 6) and this is working fine.

    However, I would really like to have access list of Umbraco.Web.Models.DynamicPublishedContent objects with all of it's properties available, etc.

    Where I am getting stuck is what to do next.

    Is there a recommended way to pull out a list of DynamicContent joined to my custom database table in order to show the most viewed content that was created / published in the last X days?

    Or, am I going about this the wrong way?

    Any direction / feedback would be much appreciated.

    Thanks.

  • Andrew Clarke 6 posts 26 karma points
    Aug 22, 2014 @ 06:59
    Andrew Clarke
    0

    So after doing some more research, I'll try and tackle this issue using PetaPoco ORM instead of EF.

    If anyone has some thoughts on how to best achieve this using PetaPoco, I'd love to hear them.

Please Sign in or register to post replies

Write your reply to:

Draft