Clicks
This module was designed to track clicks of any link the current site. The link may point to a URL within the current site or to an external URL. Change the HRef from "/Link.aspx" to "/Click.aspx?url=%2fLink.aspx" to track the clicks. Point your link to "/Click.aspx?url=EncodedUrl" where EncodedUrl is the link destination encoded for use in the query string. You can encode a URL for use in a query string using the Development > Utilities > URL Encoding tool. Click.aspx records the click, if it is not a search crawler, and redirects to the URL included in the query string. Click.aspx also supports a few additional query string variables to enhance the reporting options. The "mid" and "did" query string variables can be added to track a ModuleId and/or DataId along with the click and must contain a valid GUID. These are often used by system modules that have been integrated with the Clicks module. The "iid" query string variable can also be added to track an IntegrationId which is basically any string with 256 or fewer characters. All of these query string variables can be populated manually or using CpScripting.
Once you have the link on your site the clicks module will automatically begin tracking clicks. By default the Stats > Clicks module displays the number of times each tracked URL has been clicked. It stores these URLs uniquely and completely, but the results can be grouped for partial URL results. For instance, you can use the Group By selector to display the counts of only the Local Path and Query portion of the URL if the same page is displayed on multiple domains (Hosts). Clicking on a group will automatically redirect you to a filtered list of complete URLs within that group and the only way to return to the original view is by selecting "Nothing (URL)" from the Group By selector. When you click on a complete URL you are taken to the Clicks Log for that URL. This view itemizes each click including when it occurred, information about the request (user), and the additional query string information (ModuleId, DataId, IntegrationId). This click information can also be reviewed by creating a custom report using the Reporting > Report Builder module.