How does Hit Count work

Hi,


I've started some testing with the hit count listing and associated triggers. I'm curious as to the mechanism by which it works. Is there a separate table in the DB where the hits are recorded?



It seems there are (at least) two occassions when hits are not recorded:

  • When the content is coming for a cache (which makes sense)
  • When the content is a static file - or at least when the content is a static file coming from an alternative static URL (which again makes sense).



    Is this assessment correct? If so, is there a way to work around this?



    We want to build a list of the most accessed assets in a particular part of the site (for users not analytics).



    Thanks

[quote]

  • When the content is a static file - or at least when the content is a static file coming from an alternative static URL (which again makes sense).

    [/quote]



    Set "allow unrestricted" to no so that Matrix will serve the files rather than Apache. This will let you trigger hit counts for these file assets.



    We do this on puc.edu for about 50 files and don't see any speed issues. But, if you are doing it for your entire site it might not be a goo idea to have Matrix host each file.



    Why not let Google track your file hit counts?

Thanks Nic. Serving even some of our static content from Matrix would be bad for Matrix.


We are using google to track the hit counts but I need to generate a list of the most accessed files. I was hoping to do that in Matrix.

Could you build something using google analytics API and a REST resource asset?

[quote]
Could you build something using google analytics API and a REST resource asset?

[/quote]



HI Jeffery



I’m interested in doing a similar thing as i suspect you are trying to do. Have you got a solution yet? Would be interested in it if you have.



Michael

sjordan - I've investigated your suggestion. I can't seem to get oAuth working (see http://forums.matrix.squiz.net/index.php?showtopic=7698) which prevents it working.


Michael - We've pretty much decided to just have a static list which we will manually update based on the results from GA. I did consider writing an external script that would pull the data from GA then use Matrix web services to modify the list but it seems like massive overkill.