• Resolved kendawes

    (@kendawes)


    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!

    https://www.ads-software.com/plugins/official-statcounter-plugin-for-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kendawes

    (@kendawes)

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

    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="https://www.statcounter.com/counter/counter.js"></script>
    <noscript><div class="statcounter"><a
    href="https://statcounter.com/www.ads-software.com/"
    target="_blank"><img
    src="https://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

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