What you could do is do this....

Instead of loading the image/swf, make the script load a cfm file like...

<img src="loader.cfm?adImage.gif" />

then you could increment the counter for that ad based on the file being
used to load the ad.

Then because you know the name of the image/swf you can then read the file,
then output it and push it to the client using cfcontent to set the content
type of the stream you are pushing to the browser...

Hows that?

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf
Of Andrew Myers
Sent: Thursday, 11 June 2009 12:03 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Banner Tracking


Hi All,

My app uses a custom banner system, with a fairly basic mechanism to track  
"click throughs", and I would like to expand this to also log the number  
of times a particular banner (either a gif, jpg or swf file) has been  
displayed.

Currently I track click-throughs by an insert into a "page_access" table  
each time someone clicks my "show_banner.cfm" page, eg something like:

insert into page_access(page_id, access_time, query_string) values (15,  
#CreateODBCDateTime(now())#, #url.banner_id#)

(page id of 15 means the "show_banner" page, and the banner_id identifies  
which banner).

I could track the impressions a similar way I guess, but the amount of  
data is going to be massive.  I'm thinking this is what I need to do  
though, and perhaps write out a daily(?) summary somewhere, then clear out  
the historical data?

Using a "counter" variable somewhere is another option, but I don't like  
this as I'd need to use locking wouldn't I, and that could be a problem if  
the site is heavily trafficked.

Is anyone else willing to share how they track click throughs, impressions  
or any other site traffic?

Andrew.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to