Support » Installing WordPress » WordPress and StatCounter

  • DomFel

    (@domfel)


    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!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

    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.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

    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?

    DomFel

    (@domfel)

    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

    DomFel

    (@domfel)

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

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

    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"/>

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

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

    DomFel

    (@domfel)

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

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

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

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator 🚀

    Ok, open up index.php and look for:

  • <h2><?php _e('Admin'); ?></h2>
DomFel

(@domfel)

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

(@domfel)

Thanks a lot for your help macmanx.

Mark (podz)

(@podz)

Support Maven

DomFel

(@domfel)

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

(@domfel)

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!

Moderator James Huff

(@macmanx)

Volunteer Moderator 🚀

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

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘WordPress and StatCounter’ is closed to new replies.