JamesConnor Posted August 12, 2013 Share Posted August 12, 2013 On my website I have a video page like youtube, I want to store data when a user visits the video page. The data I want to store is videoID, IP, referrer and date. My concern is that I am not sure of the best way to store this data. One option I have thought about is MySQL and the other is in a CSV file. If I have lots of data which option would be the quickest to read the data from? I can think about pros and cons for both options but what is your opinion? (Keeping in mind growth of the website). Also, are there any other viable options I have not thought about? Link to comment https://forums.phpfreaks.com/topic/281068-storing-web-analytics-data/ Share on other sites More sharing options...
sKunKbad Posted August 12, 2013 Share Posted August 12, 2013 I think a problem with the CSV would be that if the file gets big then read/write times are going to be really long. You'd never have this problem with a MySQL insert. Personally I'd just use Google analytics or statcounter. You wouldn't be able to collect IP with Google analytics, because it's against their TOS, but statcounter shows it by default (unless they've changed it recently). Link to comment https://forums.phpfreaks.com/topic/281068-storing-web-analytics-data/#findComment-1444548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.