Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Hits from search engines  (Read 2600 times)

0 Members and 1 Guest are viewing this topic.

E. William

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Hits from search engines
« on: December 29, 2013, 11:19:03 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Hits from search engines
« Reply #1 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.
Logged

E. William

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: Hits from search engines
« Reply #2 on: December 30, 2013, 05:48:19 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Hits from search engines
« Reply #3 on: January 02, 2014, 12:43:47 pm »

You could use cpg_determine_client(), which returns an array like
Code: [Select]
    $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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Hits from search engines
« Reply #4 on: January 02, 2014, 01:22:45 pm »

Have a look at the function cpg_determine_client() in include/functions.inc.php to get an idea what browsers Coppermine detects.
Logged
Pages: [1]   Go Up
 

Page created in 0.129 seconds with 21 queries.