Page 1 of 1

Tracking Banner Impressions by day

Posted: Tue May 09, 2006 9:11 pm
by GeXus
Hello, I want to write a script that will track impressions to a specific page load (which will contain a banner)...

I'm trying to determine the best way to do this. The way i see it being done is this...

1. Check the database for todays date, if it does not exist it will create a record with todays date
2. Everytime the page is loaded, it will get the count value from the database.
3. If the count is null it will set this value to 1
4. If the count is not null, it will simply add 1 to whatever value is returned.

Does that sound about right?

Posted: Tue May 09, 2006 9:22 pm
by hawleyjr
Create a table with an auto inc field, a date time field

Code: Select all

'INSERT INTO MYTABLE SET date_time_field = now()'

Sometime people like to track IP and browser type also...If so, just add an extra field or two for those items.

Then you can do a count with a group by date query.