Support » Plugin: StatCounter - Free Real Time Visitor Stats » Code manually entered as well as plugin?

  • Resolved kendawes


    I’ve inherited the care and feeding of a site that uses your Statcounter plugin. The owner of the site *is* signed up on Statcounter so the Project and the Security numbers have been entered. Seems to work great! But I have a question.

    I can see the Statcounter code just above the close body tag… However the person that built the site has also manually entered into the header.php file…

    ‘<script type=”text/javascript”>
    var sc_click_stat=1;

    just below the opening body tag.

    Can you tell me what this var does and is it necessary and if so, is that the correct placement?

    Hope you can enlighten me!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Oops! That was supposed to be inside backticks… ;-))


    Sorry for the confusion! That’s not actually correct. All vars should be inside our <script> section. Please try and move it there.

    Something like this

    <!-- Start of StatCounter Code for Default Guide -->
    <script type="text/javascript">
    var sc_project=1234567;
    var sc_invisible=0;
    var sc_security="a1b2c3d4";
    <script type="text/javascript"
    <noscript><div class="statcounter"><a
    alt="site stats"></a></div></noscript>
    <!-- End of StatCounter Code for Default Guide -->

    Do let me know how it goes.

    StatCounter Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code manually entered as well as plugin?’ is closed to new replies.