First, there's a clever trick to using those output modifiers. Instead of making MODx process the chunk every time, which it will do before it even looks at the eq= part, you only want it processed if it's necessary. So instead of putting the whole chunk tag inside the modifier's tags, put the chunk's outer tags outside the modifier and just put the chunk name inside, like this:
[[[[*class_key:eq=`modStaticResource`:then=`$trackingSnippet`]]]]
Now if the result of the eq= is false, just the empty outer [[]] will be generated, which MODx will remove next time through the content, while if it is true then [[$trackingSnippet]] will be output, and MODx will later process the chunk.
Now. On to the point. Using an output modifier in this case isn't such a good idea; it's much slower than running a snippet, and since you want to run a snippet anyway, why make MODx process an output modifier, then process a chunk, in order to find a snippet to run? Just use the snippet, and have your conditional in a snippet.
if($modx->resource->get('class_key') == 'modStaticResource') {
//do stuff here
}
See
Bob's Guides for how to deal with resources in the MODx way. I can also recommend
Bob's book, as well as
W. Shawn Wilkerson's book.
Actually, I would use MIGXdb to create and manage the custom tables for storing the data, as well as for managing it with a MIGx-based CMP.
This tutorial will help you get started in creating and managing your custom tables. (as of this writing, the new documentation site is a little buggy; it's best viewed with the latest version of Google Chrome for now. Otherwise, if the pages won't scroll down, you have to use the links at the beginning of the page, and the back button on your browser to navigate through the tutorial page)