WordPress.org

Forums

WordPress and StatCounter (21 posts)

  1. DomFel
    Member
    Posted 10 years ago #

    Does any of you know how to add a counter to a WP board? I would like to add a StatCounter to mt website, is it compatible or not?
    Cheers!

  2. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    All you have to do is take the HTML code that they provide and paste it an the exact spot you want in index.php. Just as if you were adding the counter to any normal page.

  3. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    I tried both the invisible normal code and the invisible XHTML compliant code. I'd use the invisible normal code (don't forget to ad a / just before the img tag closes).
    I know there are some other WP user who use StatCounter. Which code do you guys use?

  4. DomFel
    Member
    Posted 10 years ago #

    What the hell is missing with this code??
    <!-- Start of StatCounter Code -->
    <script type="text/javascript" language="javascript">
    <!--
    var sc_project=474591;
    var sc_partition=2;
    var sc_invisible=1;
    //-->
    </script>
    <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><img src="http://c3.statcounter.com/counter.php?sc_project=474591&amp;java=0&amp;invisible=1" alt="site stats" border="0"> </noscript>
    <!-- End of StatCounter Code -->
    It should be W3 and frames compliant, but whenever I paste it into the index.php, wherever I put it, it will fcuk up my webpage. I'm using Kubric 1.2.6 as template.
    Any help will be appreciated
    http://www.domenicofeliciani.com

  5. DomFel
    Member
    Posted 10 years ago #

    macmanx you were speaking about closing the img tag with a '/'. What does it mean? ... :'( Sorry guys about my newbieness!

  6. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Dom, look in index.php for your login link. Add
    right behind it, and then your counter code behind that. As for the slash, just add it before the img tag closes, just like this: <img src="http://c3.statcounter.com/counter.php?sc_project=474591&amp;amp;java=0&amp;amp;invisible=1" alt="site stats" border="0"/>

  7. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Actually, hang on a sec, I'll get it for you.

  8. DomFel
    Member
    Posted 10 years ago #

    Thannk a lot for your help macmanx. Really appreciate it. Tried everything with your code...doesn't wanna work! :'(

  9. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Hm, hang on. I'll give it one more shot.

  10. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Ok, open up index.php and look for:

  11. <h2><?php _e('Admin'); ?></h2>

  • DomFel
    Member
    Posted 10 years ago #

    No way, it doesn't work. Looks like as soon as I try to edit the index.php, no matter how little the edit is, the page won't load correctly. >:(

  • DomFel
    Member
    Posted 10 years ago #

    Thanks a lot for your help macmanx.

  • Mark (podz)
    Support Maven
    Posted 10 years ago #

  • DomFel
    Member
    Posted 10 years ago #

    Yayy!!...Shhh, we make it to work, don't disturb it anymore, just leave that bloody StatCounter code alone....Thanks a lot for you help, again!

  • DomFel
    Member
    Posted 10 years ago #

    Yayy!!...Shhh, we make it to work, don't disturb it anymore, just leave that bloody StatCounter code alone....Thanks a lot for you help, again!

  • James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Hm, I'm assuming that you got it to work right. ^_^ Excellent, glad I could help.

  • Mark (podz)
    Support Maven
    Posted 10 years ago #

    DomFel - I couldn't tell if it was solved, which is why I posted :)

  • DomFel
    Member
    Posted 10 years ago #

    podz one question for you... Why macmanx is STILL a member only?? Looks like he's always posting around here! ;-)
    Cheers and good night!

  • James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Awww, now you're gonna make be blush. Heh, still glad I could help out. That was fun. ^_^

  • jacobjmorris
    Member
    Posted 9 years ago #

    well uploaded my statcounter code in my index.php file and it's still not showing in the code in the live version, anyone else had this problem?

  • James Huff
    Volunteer Moderator
    Posted 9 years ago #

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags