Hits from search engines Hits from search engines
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Hits from search engines

Started by E. William, December 29, 2013, 11:19:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

E. William

Hi,

I've used this modification (counting hits on refresh) and noticed that hits from web crawlers are also counted (not sure if that also occurs without this mod). Is there a way not to count bot hits, but only human hits while using this mod?

Again, thanks so much for your help.

Αndré

How do you want to distinguish if a visitor is a bot or a human? You'd need to rely on the browser's user agent or filter by IP.

E. William

Quote from: Αndré on December 30, 2013, 09:51:44 AM
How do you want to distinguish if a visitor is a bot or a human? You'd need to rely on the browser's user agent or filter by IP.

The detailed hit stats do recognize Googlebots (not sure about others, since my website hasn't gone officially live yet). So theoretically it should be able to identify at least certain webcrawlers. Not sure if it's worth the effort (depending on how often the pages are crawled). I could tell the bots to only crawl certain pages once a year...

I've also noticed that pages are crawled multiple times through album keywords, resulting in different links to the same pages (all meta pages have a nofollow tag). I might also look into using canonical tags.

Αndré

You could use cpg_determine_client(), which returns an array like
    $return_array = array(
        'os' => $os,
        'browser' => $browser,
        'query_terms' => $query_terms
    );


You'd need to check the browser part and exclude the "browsers" you don't want to add hits.

Αndré

Have a look at the function cpg_determine_client() in include/functions.inc.php to get an idea what browsers Coppermine detects.