The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!
You are not logged in.
I was trying to figure out why the views where so high when i knew traffic was low. After going through the video_history table and seeing a pattern in the ip strings, I finally converted them to see it was the indexing spiders from google registering. Is there a way to filter by IP or by agent to insure we are only counting valid human views?
Offline
Go to modules/video/components/view.php and find this line:
$this->db->query("UPDATE #__video
SET total_views = total_views+1,
view_date = '".$date."',
view_time = ".time()."
WHERE video_id = ".$this->video_id." LIMIT 1");
replace with:
if (!VBrowser::get('is_robot')) {
$this->db->query("UPDATE #__video
SET total_views = total_views+1,
view_date = '".$date."',
view_time = ".time()."
WHERE video_id = ".$this->video_id." LIMIT 1");
}
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
So just add this line?
if (!VBrowser::get('is_robot')) {
I'll try to test this.
You're never a loser until you quit trying.
Offline
Symtab,
Why would we not be wrapping all 3 queries right there? That would reduce even more calls to the db. For clariification for others:
if (!VBrowser::get('is_robot')) {
$this->db->query("UPDATE #__video
SET total_views = total_views+1,
view_date = '".$date."',
view_time = ".time()."
WHERE video_id = ".$this->video_id." LIMIT 1");
$this->db->query("UPDATE #__user_activity SET total_video_views = total_video_views+1 WHERE user_id = ".$owner_id." LIMIT 1");
$this->db->query("INSERT INTO #__video_history
SET video_id = ".$this->video_id.",
user_id = ".$user_id.",
ip = ".$ip.",
view_date = '".$date."'");
}
Offline
Ok. Will do this. I thaught that a busy site is better, but a faster site is even better :-)
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Symtab, this hasn't resolved the issue. I thought it did as traffic initially dropped. For some reason I had Google hit me 4826 times in the last 5 hours. Although the busy site looks nice, it is impacting site performance (I would assume as that is an additional almost 15K queries to the DB for no reason). Do you think there is something I missed?
Offline
Hmmm...so even after you added the !VBrowser::get('is_robot') line, the video views are still update for robots? If will check my browser class and robots config file.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
I had the same problem my database after 1 month was 2 GB so i have removed the
$this->db->query("INSERT INTO #__video_history
SET video_id = ".$this->video_id.",
user_id = ".$user_id.",
ip = ".$ip.",
view_date = '".$date."'");
}
and my database is 70MB
Offline
I know that. The video history is removed from 1.0 (i changed it and with cron you can keep the daily statistics, and also have a small db).
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Ok, I will do the same.
Offline
@THS: even after the !VBrowser:get('is_robot') line, it still counts robots?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Unfortunately, yes. The long ip with the most daily hits comes back to google directly.
Offline
Hmm...in access_log can you see its a robot?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Where is this one located? My server logs are stuffed with so many requests its not possible to tell whats what anymore. Apologies.
Offline
Its the apache access log. I'm worried that the script does not detect the robot, there must be a error somewhere I'll retest this before 1.0.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
I have a way of confirming this (I hope via the logs). I will check shortly.
Offline
I was able to only add the views update on non robot visitors. I will mark this a partially fixed, and once i test this in the wild i will mark it as fixed.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Its a design problem that remained from the first version of the script. I will check and find if view_date is used and if its not used. I will remove it.
UPDATE: removed from the video view component.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline