Frequently Asked Questions:
FAQ: Where does my Statcounter code go?
If you’re using Statcounter to track your hits, this is where you insert the tracking code:
In your WP Admin area, go to “Design” (”Presentation” in old versions of WP) –> “Theme Editor” and open up the file called “Header (header.php).” Insert the code right AFTER this line:
<body class="<?php sandbox_body_class() ?>">
Then save your changes.
Related post: Adding Google Analytics tracking code to your blog
Questions? Instead of emailing for support, leave a comment below so everyone can benefit from any clarification.
<body class=”"oncontextmenu=”return false” ondragstart=”return false” onselectstart=”return false”>
sc_project=3666946;
sc_invisible=1;
sc_partition=44;
sc_security=”0f37ab26″;
Like this??
Pam Campbell » that doesn’t look like the right code to me. are you sure that’s what the statcounter website told you to paste in?
it may be that i’m not seeing it right, because sometimes when you paste html into comments, you lose some of it…
I deleted the stuff under the <body …etc. part thinking that it was my statcounter html bcs. sitemeter is all screwy…anyway, I screwed up my website by taking 2 lines out that were under this part…any idea what that was? I think I need to put it back in…
Can you use Google Analytics and Statcounter at the same time?
@Dan: I don’t see why not… But I don’t see why…
Hi, ive entered:
var sc_project=3985174;
var sc_invisible=0;
var sc_partition=48;
var sc_click_stat=1;
var sc_security=”3a06fb15″;
Exactly where it said to put it (I hope), and my statcounter is at the top LHS of my site, I’d really like it down the bottom, in the ‘header’ section – any ideas how to move it?
@Lauren: try pasting it into the footer.php file, right before the </body> tag
Thank you!! That looks a lot better.
I think that is the same code that I just removed to disable the right click… So now where should I put it? Thx!
@Sarah Lane: yeah, if you read carefully, you’re supposed to paste the statcounter code right after that chunk, whereas for the disable right-click you are actually editing that line.
If I’m using google analytics, do I also need to use Statcounter or do I only use Statcounter if I’m not using goggle analytics? Just making sure before I do something I shouldn’t (or don’t something I should).
@amanda: you really only need one or the other.
I just put the code for Statcounter after
<body class=”">
and before
oncontextmenu=”return false” ondragstart=”return false” onselectstart=”return false”>
On my blog site I am getting:
oncontextmenu=”return false” ondragstart=”return false” onselectstart=”return false”>
on the top left corner. How do I get that off my page?
The same thing that happened to Jamie, happened to me:
I just put the code for Statcounter after
and before
oncontextmenu=”return false” ondragstart=”return false” onselectstart=”return false”>
On my blog site I am getting:
oncontextmenu=”return false” ondragstart=”return false” onselectstart=”return false”>
on the top left corner. How do I get that off my page?
@Aris & Jamie:
you put the statcounter code completely on a new line after the body tag, not in the middle of the tag. you’ll need to reset the body tag to how it was.
Thanks! I took the directions quite literally. Sorry, I’m new to this.
Hi Jared,
I did again and it is still on top of the page.
What can I do now?
Thanks
@Aris: sent you an email.
Ok, Now I’m having the same problem as Jamie and Aris. I thought I would reset the body and for fear of resetting the entire website I deleted most everything on the reset page except for the word ‘Body’ within the reset part and now I’ve messed up my reset link. Any help would greatly be appreciated.
Hey just found this blog, been looking around at a few websites but this post is one of the best I have seen. Good work!
thought about grasp more me happy to see stuffed with misinformation as long as Excellent I’ll go ahead and
Can I publish your put up to my weblog? I will add a backlink to your forum. That’s one actually candy post.
Hey – nice weblog, just wanting around some blogs, seems a fairly good platform You Are using. I’m at the moment utilizing Drupal for a couple of of my sites but trying to change considered one of them over to a platform very much the same to yours as a trial run. Anything in particular you’d advocate about it?