Where do I put statcounter code?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Where do I put statcounter code?

Post by accampbell » Wed Feb 09, 2011 10:04 am

I found a post here saying statcounter code should go in templates/bulletproof/index.tpl. I don't understand the syntax of this file very well. Whre should the code go - at the end?
Anthony Campbell

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Where do I put statcounter code?

Post by Timbalu » Wed Feb 09, 2011 10:18 am

Hi Anthony

Yes, the index is ok for that.
But which template do you use? Bulletproof? Take the index of you template.
Somewhere in the footer section would be a choice, or with a nugget inside of the sidebar.

Ian

User avatar
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Where do I put statcounter code?

Post by kleinerChemiker » Wed Feb 09, 2011 11:08 am

I think the Bulletproof theme has an option for counters in the setup.

accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: Where do I put statcounter code?

Post by accampbell » Wed Feb 09, 2011 3:15 pm

Thanks to both for replies. In the end I put the code at the bottom of templates/default/index.tpl and that is working.
Anthony Campbell

User avatar
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Where do I put statcounter code?

Post by yellowled » Wed Feb 09, 2011 4:08 pm

accampbell wrote:Whre should the code go - at the end?
In fact, it depends a little on the exact statcounter code, but in most of the case, you should be fine using the theme option recommended here.

The huge advantage of using the theme option is that it is safe in case of an update. Code in your index.tpl will be overwritten by the next update to S9y and/or BP, code inserted using the theme option box will still work. Of course, this does not apply if you're working with a copy of BP in a seperate directory.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply