You could write a simple mod_perl handler that looks at the URL being called, and the variables being POSTed or GETed. The easiest place to stick it would probably be at the FixupHandler stage. This gets executed right before the content is generated. In your case just before the CGI is called.

If you need to know what is being served up by the software as well (ie need to look at the resulting HTML from the CGI call), then you could look at the new Filter support in mod_perl2 (needs Apache 2.0.x). With that you can write a filter in perl that will recieve the HTML that was generated by the content handler (the CGI script in this case), and you can do what you like with it. You would probably want to parse it for any pertinant info, and pass it on unchanged...

If none of this helps, then maybe you could give us some more info, like what user info are you trying to track? And how is a user defined in the app (cookie, basic auth, url rewriting, hidden vars)? If the user is already being tracked by a cookie through the app, and you just want to know which users visit which URLs, then you could look at just adding a custom log rule to apache to track the URL and the cookie to a log file (see how the mod_usertrack module logs cookie values).

- Cees


In reply to Re: User Tracking in closed source application. by cees
in thread User Tracking in closed source application. by rlb3

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.