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?
Tracking Banner Impressions by day
Moderator: General Moderators
Create a table with an auto inc field, a date time field
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.
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.