Recent Topics

1 May 18, 2006 16:10    

I've noticed within Admin/Stats that my visits are recorded under Direct Access. Is there a way to cancel out my visits?

Thanks in advance.

2 May 18, 2006 16:33

0.9.0.12
if ( !isset( $current_User ) or $current_User->Group->ID != 1 ) log_hit(); // log the hit on this page

1.6+
if ( !isset( $current_User ) or $current_User->Group->ID != 1 ) $Hit->log(); // log the hit on this page

¥

3 Jul 22, 2006 05:26

if I go to my home page and then I click on a link to another blog on my own site - how is that logged?

is it a "referring site" or a direct visit?

4 Jul 22, 2006 05:48

It depends. In 0.9.1, which is the version you're running, it would be logged as a referer IF you don't have your own domain added to the "blacklist" array in your conf/_stats.php file. If you don't want to see your own domain as a constant referer then you have to edit that file, like so:

	// redirectors
	'googlealert.com/',
	// add your own...
);


Where it says to add your own that's what you do!

	// redirectors
	'googlealert.com/',
	// add your own...
	'thechristianalert.org',
);


After that I don't think visits from within your own page will be logged at all. You will NOT blacklist yourself by adding yourself to blacklist array! Kinda funny, but that's the way it was.

5 Jul 24, 2006 06:31

Thanks Ed...

Another question is:

Is there a way to check if actual users are "subscribing" - I see a lot of sindication entries in the stats.tabs - but I am not sure if those are "search engines" or real users...

any thoughts?

Edgar

6 Jul 07, 2012 00:57

Hi, you have given a very welcome solution in order not to count own access to the blog in the stats:

¥åßßå wrote:

0.9.0.12
if ( !isset( $current_User ) or $current_User->Group->ID != 1 ) log_hit(); // log the hit on this page

1.6+
if ( !isset( $current_User ) or $current_User->Group->ID != 1 ) $Hit->log(); // log the hit on this page

¥

In which file has your programm code to be insert?
I am working with version 3.3.1.

Many thanks!
Karin

7 Jul 08, 2012 04:21

Add this code anywhere in your skin. Replace 1 with your user ID.

if( is_logged_in() && $GLOBALS['current_User']->ID == 1 )
{  // Do not log this hit
    $GLOBALS['Hit']->logged = true;
}


Form is loading...