Last post May 08, 2009 02:10 PM by dotnetnoob
May 05, 2009 06:08 PM|dotnetnoob|LINK
Hi All: I have an ASP website written primarily in VBScript, that logs all incoming traffic (requested page, referrer, source-code, etc) to a table in SQL2005. The website runs on server2003/IIS6. The tracking code runs as an include file on all the ASP
A blog was recently added using Wordpress, PHP and mySQL, and incoming traffic to the blog needs to be captured along with the rest of the website.
Given that the site architecture will likely eventually migrate to .NET and IIS7, would it make sense to consolidate the tracking functionality to an HTTP module now? Would an HTTP module be able to intercept the PHP page requests so that the tracking could
May 06, 2009 11:03 PM|infosolvex|LINK
Yes you could use a httphandler to track stuff when you eventually move to the .Net platform. Except it will not intercept the php page, but I would go with a client side tracking implimentation, that is use a pixcel image to make a call to the http handler
from within your PHP page or ASPX page. This gives you the flexibility of using the tracking tool to work with any web technology for now or in future.
May 07, 2009 06:58 AM|dotnetnoob|LINK
Thanks, I understand what you're saying, and I've implemented that handler for tracking email opens...but in this particular instance I need to capture more information, like the referrer and any QS variables that might have been passed in the original request.
If I understand what you're suggesting, then I would only be able to track the fact that the page was viewed?
If I was running server2008/IIS7, would there be any way to intercept the page request, even if it was for a PHP page? Or would I still have to look at some sort of ISAPI extension?
Or is the only thing I can do is rewrite my tracking script in PHP for the PHP pages?
May 07, 2009 07:47 AM|infosolvex|LINK
Not really you can track more than just the page view. You can pass any additional information as parameters in the image url used for tracking and extract them form the query string. It's possible to write an isapi extension but wouldn't advise it for
the effort involved when you can achieve the same thing withthe client side implimentation.
May 08, 2009 08:00 AM|dotnetnoob|LINK
Thank you again for trying to help...the problem is I need to track activity when the page is first loaded...for example if someone clicks a link on a different website that points to this page, or if someone clicks on a link to this page from a search engine,
I need to be able to capture the referrer. The only way I think I could do that is to write a PHP script that would then generate an image request in the page with the parameters you describe...but if I do that, I may as well just do everything in PHP? Or
am I not understanding you correctly?
May 08, 2009 08:12 AM|infosolvex|LINK
Yes you understood me correctly, Im assuming it should only be one line of script in php that you would include in the root of the php application that will insert the refferer as a parameter in the image url. But again I am not sure of what your requirements
are and if you did write something like that in PHP that would mean writing the whole filter and dataaccess again in php, Im not entierly sure if this was only required by your php or aspx pages as well. Ill let you be the judge of what suites your application
May 08, 2009 02:10 PM|dotnetnoob|LINK