h2. What is HitsPage?
HitsPage is a Plugin that counts the number of http requests, or "hits" on a given web page.
h2. Requirements
MODX Revolution {color:#444444}2.1.x or later{color}
h2. History
{color:#444444}HitsPage was written by Valentine Rasulov and released October 27th, 2011{color}
h3. {color:#444444}Download{color}
{color:#222222}It can be downloaded from within the MODx Revolution manager via{color} [revolution20:Package Management]{color:#222222}, or from the MODx Extras Repository, here:{color}
{color:#222222}[http://modx.com/extras/package/hitspage]{color}
h2. Usage
{color:#222222}Upon installation, HitsPage creates two new{color} {color:#222222}[revolution20:Template Variables]{color}{color:#222222}, "HitsPage" and "hits". At the time of this writing, the "hits" TV is redundant.{color}
{color:#222222}On the{color} {color:#222222}[revolution20:Resource]{color} {color:#222222}that you'd like to track hits, use the placeholder:{color}
{code}
[[!+hitss]]
{code}
{color:#222222}You can put this in the Resource Content Field, or in its{color} {color:#222222}[Template|revolution20:Templates]{color}{color:#222222}, but it MUST be present on the page you wish to track. You can hide its display using CSS, if you wish.{color}
{note:title=Idiosyncratic Behaviour}{color:#222222}Do NOT use the TV tag to render output on the page. It seems to break the plugin. Only use it in &tpl chunks (see below).{color}{note}
{color:#222222}Once the placeholder is...in place, the "HitsPage" TV will be dynamically updated with the hit count, making it available to{color} {color:#222222}[revolution20:Snippets]{color} {color:#222222}via their Tpl{color} {color:#222222}[revolution20:Chunks]{color}{color:#222222}.{color}
h2. Examples
{color:#222222}A{color} {color:#222222}[ADDON:getResources]{color} {color:#222222}call using the following &tpl will return a list of pages displaying their Titles and the number of hits they've received:{color}
{code}
<li>[[+pagetitle]] has been viewed [[+tv.HitsPage]] times.</li>
{code}
{info:title=Usage Example}You can easily create a "Most Popular Posts" widget by following the tutorial here: [http://www.sepiariver.ca/blog/modx-web/modx-popular-posts-plugin-hit-counter-getresources]{info}
HitsPage is a Plugin that counts the number of http requests, or "hits" on a given web page.
h2. Requirements
MODX Revolution {color:#444444}2.1.x or later{color}
h2. History
{color:#444444}HitsPage was written by Valentine Rasulov and released October 27th, 2011{color}
h3. {color:#444444}Download{color}
{color:#222222}It can be downloaded from within the MODx Revolution manager via{color} [revolution20:Package Management]{color:#222222}, or from the MODx Extras Repository, here:{color}
{color:#222222}[http://modx.com/extras/package/hitspage]{color}
h2. Usage
{color:#222222}Upon installation, HitsPage creates two new{color} {color:#222222}[revolution20:Template Variables]{color}{color:#222222}, "HitsPage" and "hits". At the time of this writing, the "hits" TV is redundant.{color}
{color:#222222}On the{color} {color:#222222}[revolution20:Resource]{color} {color:#222222}that you'd like to track hits, use the placeholder:{color}
{code}
[[!+hitss]]
{code}
{color:#222222}You can put this in the Resource Content Field, or in its{color} {color:#222222}[Template|revolution20:Templates]{color}{color:#222222}, but it MUST be present on the page you wish to track. You can hide its display using CSS, if you wish.{color}
{note:title=Idiosyncratic Behaviour}{color:#222222}Do NOT use the TV tag to render output on the page. It seems to break the plugin. Only use it in &tpl chunks (see below).{color}{note}
{color:#222222}Once the placeholder is...in place, the "HitsPage" TV will be dynamically updated with the hit count, making it available to{color} {color:#222222}[revolution20:Snippets]{color} {color:#222222}via their Tpl{color} {color:#222222}[revolution20:Chunks]{color}{color:#222222}.{color}
h2. Examples
{color:#222222}A{color} {color:#222222}[ADDON:getResources]{color} {color:#222222}call using the following &tpl will return a list of pages displaying their Titles and the number of hits they've received:{color}
{code}
<li>[[+pagetitle]] has been viewed [[+tv.HitsPage]] times.</li>
{code}
{info:title=Usage Example}You can easily create a "Most Popular Posts" widget by following the tutorial here: [http://www.sepiariver.ca/blog/modx-web/modx-popular-posts-plugin-hit-counter-getresources]{info}