countTrackula Icon


Get a hashed link and download count for any local/remote file.

By Devin Gaul (demon.devin)

countTrackula first screenshot

countTrackula 2.0

With this snippet you will have the ability to display the number of downloads for a local file or the number of clicks on a remote file. It'll also create a hashed link of the local or remote file for security purposes hiding the file path of a locally hosted file.

System Settings

Name Description
algo The desired algorithm to use when creating a checksum of the download file. Refer to the PHP Documentation for a list of supported algorithms to choose from. Default: SHA1
salt Define a secret passphrase to be used with generating the checksum. Default: countTrackula's best friend is decrypt-keeper
core_path Just the path to the component files for use with the snippet. Best just to leave this untouched.


Property Type Req/Opt Description
&path String Required Path to the download file from webroot.
&file String Required The filename of the download without slashes.
&name String Required The name of your download file for display purposes.
&term String Optional The word shown next to download count. (i.e. 18 hits)
&hits Boolean Optional If true, only shows the download count of &file.
&tpl String Optional The chunk used for displaying the download link to the client.


—Locally Hosted Files

Define a download with a property path of downloads/ and a property file of with the property name of My Package


My Package (18 downloads)

<a href="">My Package</a> (18 downloads)

To only show the download count of My Package but use the term hits instead of downloads use the following:


18 hits

—Remotely Hosted Files

To define a remote file for download with the property term of clicks set the file property as the link to the file like below. Note: This feature has barely been tested so please report any erroneous findings you may run into on my [GitHub project page](


countTrackula (18 clicks)

<a href="">countTrackula</a> (18 clicks)

Devin Gaul


New in countTrackula 2.0.0-rc1

Changelog for countTrackula

countTrackula 2.0

A complete rewrite of the script - Added support for both local and remote files - Better hashing support--added an optional user define salt - Removed file based logging in favor of MySQL logging - Added ability to show just unique downloads based on clients IP - Added support to call this snippet multiple times in a single resource

countTrackula 1.0.1

Fixed damn near everything with the script - list to long to actually write out

countTrackula 1.0.0

Initial Version - countTrackula has risen from it's eternal slumber!



October 14, 2016
Supported Versions
2 – 2.7

Previous Versions


More from Devin Gaul

Flip MODx Manager Login

Changes the default manager login page with an alternative one.


A simple, configurable context menu to replace a browser's default…


This MODx Extra snippet can show highlighted HTML source of the current…


Converts a specified image to a base64 encoding for use within a…