inserting code for a stats counter?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

inserting code for a stats counter?

augidog
http://statcounter.com/

simply put, can i insert HTML code for a free stats counter somewhere? and, if yes, where?

thanks again for everything, i'm enjoying my little ad-free forum.

http://motor-assisted-bicycling.1062526.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

GregChapman
This post was updated on .
Nabble already has the necessary code embedded in it for a Google Analytics account:
OPTIONS > APPLICATION > USE GOOGLE ANALYTICS
which should do anything Statcounter does. Do you have a particular reason for wanting to use Statcounter?

As for a hit counter, the nice folks at Nabble already supply a "Views" (i.e. Hit) counter on most screens (though that does disappear from some screens if you use the "Narrow" page layout).

Normally, I tell people that displaying a hit counter is a bit 1990s - about as trendy as using FrontPage to build a site!  - but I accept it can be useful on a forum to see which are the popular topics.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
This post was updated on .
i use "invisible" statcounter on my personal site, i find it useful & fun. i'm not-for-profit, but i like to see who and where. however, i'm a dummy when it comes to this stuff. i'll have a look at google analytics. thanks.

EDIT: i setup a google account...and i set the "analytics" option in my nabble app...long story short, is there a delay while things rock out?

EDIT AGAIN: nevermind, google help gave me the answer..."It can take up to 24 hours for Analytics to detect your tracking code."

thanks for your volunteer help, Greg.

Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
however...let's say i did want to stay with statcounter as less-invasive than google...is there someplace for me to insert the code?
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

GregChapman
I haven't tested this but I think the simplest thing would be to add the Statcounter code to the Forum description field at:
OPTIONS > APPLICATION > EDIT NAME & DESCRIPTION

That will do strange things to the metatag description field, (a field used by search engines to classify your site). So, once the Statcounter code is inserted in the EDIT NAME & DESCRIPTION filed go to:
OPTIONS > APPLICATION > CHANGE TITLE & META TAGS
and remove any reference to the Statcounter code

Another slightly more professional and more technical option would be to play with the NAML code that generates the home page of the forum.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
"Another slightly more professional and more technical option would be to play with the NAML code that generates the home page of the forum."

well, that leaves me out heh...i'll wait and see if google picks up the code okay, it will prolly be fine.

thanks again.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
well, i really really do not like google tracking. it kicked in a little while ago, but i kicked it back out after having a look.

as i said, i'm not for profit, and i only want to be able to keep an eye on who comes along...i don't need all that gobbledegook that google throws at me.

i've been doing my best to help myself with my macro editor, but i'm getting nowhere, and now i'm tired and frustrated.

please...please...can someone just point me to the right macro in which to insert a script  from statcounter?

thank you.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

GregChapman
I'm not a Statscounter user so this is untested, but I believe if you drill down through:

view_standard edited › view_standard_page edited › forum_footer

You'll find this code:
<macro name="forum_footer">
    <n.page_node.>
        <div class="forum-footer nowrap" style="margin-top:.3em">
            <img src="/images/feeds.png" width="18" height="17" align="absmiddle" alt="feeds"/>
            <n.feeds_link/>
            <span class="weak-color" style="padding-left:.5em">|</span>
            <t>Created by <t.author.owner.avatar_and_link/></t>
            <span class="weak-color" style="padding-left:.5em">|</span>
            <n.views show_text="true"/>
        </div>
    </n.page_node.>
</macro> 
That appears to generate the line:

augidog

So I figure if following these two lines:
            <span class="weak-color" style="padding-left:.5em">|</span>
            <n.views show_text="true"/>
you add another vertical bar:
            <span class="weak-color" style="padding-left:.5em">|</span>
then your Statcounter code, it should place the necessary clickable icon there.

Depends a bit on the size of the icon I guess. As I say, untested, but should work.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
ah...i think i see now why...but i'm not that "hokey", and i don't follow trends, my friend.

one of the reasons i like statcounter is it lets me go "invisible" & there will be no clickable button. they too are ad-supported, but only inside my account control-console.

i wouldn't disrespect the kind nabble folks by going external on them...i happily pay the reasonable ad-removal fees here, and would consider it counter to my personal policies to turn around and add an outside ad just so i can count clicks.

my interest, Motorized Bicycles, is a global activity & i enjoy knowing who's been dropping by, but i'm not about making money off of their visit. i'm about riding & sharing the experience. i know, weird, huh?

Greg, thanks for the advice, i'll go mess around with the footer and see if i have any luck. i'm guessing that since i'm going  invisible i won't need the extra vertical bar? i'll try it both ways just in case.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
got it!

<override_macro name="view_standard_page">

inserted code after <n.forum_footer/> & before  </body>

removed the noscript part of the code.

and now i have an invisible statcounter that takes me right down to thread view.

whew!
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

GregChapman
As you were using an invisible counter, and I see the code in your page so I know you've managed it, I guess it didn't matter about it going in that footer line and it sits fine just above the footer where you have it.

Glad to know it worked.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: inserting code for a stats counter?

augidog
somehow i managed one-better...don't ask me when or how i figured it out, but now i am completely under the footer on every page of the app.

btw-the "noscript" part of the snippet i removed was only dealing with the stuff for the clickable button, and since it's invisible anyway...

boy, have i ever learned a lot about code in the last few days.