Track site usage using Colfusion / JavaScript / Other

Our website development team manages many websites (each with a different URL) on our INTRAnet. We would like to implement something (a piece of code) that is easy to add to the Application.cfm / OnRequestEnd.cfm page, which inserts a record into the database, tracking things like page, url, querystring, userid, etc. - basic things. Inserting a record is not a big deal. What I would like to know, in terms of performance, is that you all recommend that we do not get a bottleneck of inserts in the queue, as employees got to various sites. We cannot use jQuery, since not every site will have the same version of jQuery, so we are really limited to using Coldfusion - I think.

Ideally, what we would like to do is create one main tracking file on our main server and link to this file from all our other sites. Then, if / when we need to make an update, we can make a global change - such as how Google Analytics works, and not almost as many details.

On all sites that we support, we have the logo of our department on these pages. I was thinking of creating a tracking process in image upload, as was the case with emails.

Any thoughts on this will be appreciated if you have a better idea - I'm all ears.

UPDATED
Regarding image processing, I could not find the source link for the tutorial from easycfm.com, but I found what seems to be identical code here: http://www.experts-exchange.com/Software/Server_Software/Web_Servers/ColdFusion/ A_2386-Track-your-Emails-using-coldfusion.html

+5
source share
2 answers

Adam Cameron probably answers the way you should go. In addition, I would suggest including these records in the table without additional indexes. This will result in very quick insertion of inserts. Then you can use the scheduled database task to move this data into a good normalized schema that is quickly analyzed.

JavaScript, JQuery. , JQuery, JavaScript. JavaScript script, .

<script type="text/javascript">
    var script = document.createElement("script");
    var body = document.getElementsByTagName("body")[0];
    script.setAttribute("src", "http://www.yourdomain.com/trackingfile.cfm?" + yourparams);
    body.appendChild(script);
</script>

, JQuery.

0

, , . , , .

CFC , , , <cfquery> . OnRequestEnd.cfm.

CFC, , , , , , .

+6

All Articles