Hits from search engines Hits from search engines
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.