StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 11-24-2007, 03:18 PM
clanuis clanuis is offline
Junior Member
 
Join Date: Nov 2007
Posts: 3
Arrow In MyBB forum: How to show a counter that doesn't count visits?

Hi, our website is: www.clanuis.co.nr
My statcounter username is: clanuis

I would like to add the counter in our MyBB forum. The forum has a "global footer" section that can be used to add the code in all pages, BUT! I want to show the counter only in homepage.... if I add the invisible counter in the "global footer" also the homepage is affected and if I also add the visible counter to the homepage, it would result in having in homepage 2 counters (and counting 2 hits each visit).

Is there a code to show the counter and NOT counting a visit? This way, I can have 2 counter codes in homepage, the invisible one (taken from "global footer") wich does count visits, and the visible one wich DOESN'T count visits.

Thanks in advance.
  #2  
Old 11-24-2007, 03:27 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,176
Default

Sorry, no way to do that. There is no "view, no-log" option for the counter. If it's present when a page is loaded in the browser, visible or invisible, it will count the hit.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #3  
Old 11-24-2007, 03:33 PM
clanuis clanuis is offline
Junior Member
 
Join Date: Nov 2007
Posts: 3
Default

Thanks for replying me so fast.

Well, so.... In my case (the case of a site with this settings, like a MyBB forum), there are only 2 options: 1) Show the counter in all pages and 2) DOn't show the counter anywhere.. am I right? It seems that we cannot use here the option "show counter in homepage only" (as we cannot avoid the invisible code to be added in homepage as well)
  #4  
Old 11-24-2007, 03:47 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,176
Default

You will need to modify your software with some server-side scripting to include the counter code only on the homepage and not include it on others.

I dont' know if mybb is php driven, but f it is it woudl be something like this:

Assuming the homepage has no query string associated with it, so it can be distinguished from other pages which always have a query string, that way:

Quote:
<?php

$query_string=$_SERVER['QUERY_STRING'];
if (!$query_string) { include("counter.inc");}
?>

Then the file counter.inc will be a text file which contains all your Statcounter code as given by the Statcounter wizard, and located in the main folder of the application.

It will be somehting along thsoe lines, you need to figure out how you can distinguish the homepgae from other pages (as it occurs in navigation). If the forum's homepage is accessible under more than one url the test needs to be more extensive of course.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #5  
Old 11-25-2007, 04:48 AM
clanuis clanuis is offline
Junior Member
 
Join Date: Nov 2007
Posts: 3
Default

Thank you very much for your support. I'll try what you suggested. Regards!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:29 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.