WordPress.org

Ready to get started?Download WordPress

Forums

StatCounter - Free Real Time Visitor Stats
[resolved] Code manually entered as well as plugin? (3 posts)

  1. kendawes
    Member
    Posted 7 months ago #

    Hi!
    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;
    </script>'

    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!

    http://wordpress.org/plugins/official-statcounter-plugin-for-wordpress/

  2. kendawes
    Member
    Posted 7 months ago #

    Oops! That was supposed to be inside backticks... ;-))

  3. rory_statcounter
    Member
    Posted 6 months ago #

    Hi,

    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>
    <script type="text/javascript"
    src="http://www.statcounter.com/counter/counter.js"></script>
    <noscript><div class="statcounter"><a
    href="http://statcounter.com/wordpress.org/"
    target="_blank"><img
    src="http://c.statcounter.com/1234567/a1b2c3d4/1/"
    alt="site stats"></a></div></noscript>
    <!-- End of StatCounter Code for Default Guide -->

    Do let me know how it goes.

    Regards,
    Rory
    StatCounter Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.