The MU forums have moved to WordPress.org

capture stats properly - site hits (28 posts)

  1. bschwarting
    Member
    Posted 14 years ago #

    if i use a third party application to capture hits on my site, what files should i put the code in? will these catch every page hit?

    wp-admin/admin-footer.php
    wp-content/themes/default/footer.php

    all other footer.php pages in any other themes that might be used.

    will this catch everything? am i missing any?

  2. lunabyte
    Member
    Posted 14 years ago #

    Um, much easier to tap into the wp_footer action.

  3. bschwarting
    Member
    Posted 14 years ago #

    how would i do that?

  4. lunabyte
    Member
    Posted 14 years ago #

    Look it up on the codex.

  5. bschwarting
    Member
    Posted 14 years ago #

    thanks for nothing!

  6. lunabyte
    Member
    Posted 14 years ago #

    Give me a damn break.

    Something like that is a minimal, basic thing in WP/MU. At this level, you should have at least a small clue about how to hook into the footer.

    If not, you need more help than anyone around here can give.

    Sheesh.

  7. andrea_r
    Moderator
    Posted 14 years ago #

    If you're looking for every single hit server-wide, don't you have stats in your web account?

  8. Ovidiu
    Member
    Posted 14 years ago #

    :-) I just wondered what would happen to this forums if we didn't have lunabyte around to bash those with silly questions, wanting to be spoofed everything, ts,ts,ts

    btw. firestats springs to mind if you are looking for that kind of solution...

  9. lunabyte
    Member
    Posted 14 years ago #

    Oh gosh, 'vid... Firestats is absolutely horrible. It's OK for a few days, but once it gets some data stored, it kills resources with a quickness.

  10. cafespain
    Member
    Posted 14 years ago #

    That's good to know - I was about to download it (Firestats that is).

  11. Ovidiu
    Member
    Posted 14 years ago #

    :-) haven't come around to use it intensively, 'been just trying to give that guy an alternative to actually going and reading the codex on wo_footer ;-)

  12. lunabyte
    Member
    Posted 14 years ago #

    Well, it's not like there isn't a million posts about using that hook or anything.

    And yeah, firestats was horrid. I mean crippling.

    Let me recap a bit on it.

    The front side of it (actual collection) wasn't too bad, although it was noticeable.

    It was the backend that killed it.

    First had it on a smaller box, the same as the MU install (private, dedicated, nothing else on it). Nothing special, a little slow. Then again, so were other things.

    Moved the MU site in question to a new box, again for its sole use. And it was pretty beefy (quad core, 4G RAM, etc). MU: ran like a champ. The firestats back end... not so much. I had it set to refresh stats in the back (while viewing) at 5 minutes. The refresh would never finish before the next one set in. Doubled it, same result.

    Moved firestats to its own server, a dual core with 2G of RAM. Nothing else on it. It crippled that box as well. This was only with a few blogs using it, and me coordinating backend usage to where there were 3 people viewing at once.

    I couldn't imagine releasing it to the full site for use. It would have rendered the site dead in the water. Heck, it already was for all intensive purposes.

    I didn't dig into the code, but my best "guess" (which they're usually pretty good) is a combination of bad db structure/layout and trying to make code "too fancy", for lack of a better term.

    If you're running your own server, there are plenty of server level programs that are much better. Of course your users can't view stats, typically, but that's OK.

  13. andrea_r
    Moderator
    Posted 14 years ago #

    "Well, it's not like there isn't a million posts about using that hook or anything."

    Stop it, you're giving me an idea for a post. :)

  14. bschwarting
    Member
    Posted 14 years ago #

    wow, i started a sandstorm here. lunabyte, a simple link would have been great. i don't mind reading. I'm just not familiar with all the terminology yet. you said to "tap into the wp_footer action". that was a bit confusing, that is why i asked for clarification. i guess "tap" and "hook" are synonymous for you, but it wasn't for me.

  15. bschwarting
    Member
    Posted 14 years ago #

    andrea_r "If you're looking for every single hit server-wide, don't you have stats in your web account?"

    yes, i do, but they are stinky like most!

  16. lunabyte
    Member
    Posted 14 years ago #

    Seriously, if you can't put wp_footer into a search on the codex, you need more help than anyone here can provide.

    It's been documented so many times that it's pointless to grab the gerber and a spoon.

  17. bschwarting
    Member
    Posted 14 years ago #

    lunabyte, I'd appreciate it if you wouldn't respond to any more of my threads.

    thanks!

  18. lunabyte
    Member
    Posted 14 years ago #

    No can do, Jack.

    Welcome to America, and the internet.

    Er, I mean... "thanks for nothing!"

  19. bschwarting
    Member
    Posted 14 years ago #

    my name isn't jack

  20. lunabyte
    Member
    Posted 14 years ago #

    Gee, is that a fact?

    <roll eyes>

    How about Hoss? Bob? Ted? Wait, I know.. I call ya Rooster. That'll work.

  21. sombra
    Member
    Posted 14 years ago #

    I agree with lunabyte.
    you shouldn't touch mu if you don't know wordpress. if you're asking about wp-footer, you don't know enough. Start a blog on wordpress.com. thanks.

  22. bschwarting
    Member
    Posted 14 years ago #

    and that's what is wrong with MU forums

  23. MrBrian
    Member
    Posted 14 years ago #

    If you google "tap into wp_footer" this thread is #1 lol. Just learn that some people don't want to teach the basics when they are used to and desire more advanced questions. Lunabyte did give you enough info to find out the solution on your own though, so you should have expected the backlash when you said "thanks for nothing!". Anyway, this is how you "tap into wp_footer". In every theme, there is a function in the footer.php file that invokes the wp_footer action. Creating a plugin with the following code will do what you want. the add_action function "taps" your function 'echo_statistics_code' into the bottom of every theme.

    function echo_statistics_code() {
    echo 'place tracking code here';
    }

    add_action( 'wp_footer', 'echo_statistics_code');

  24. bschwarting
    Member
    Posted 14 years ago #

    beautiful! just as open source should be, open!

    as for the "thanks for nothing!", it was meant as a joke, but obviously not taken for that.

  25. lunabyte
    Member
    Posted 14 years ago #

    "and that's what is wrong with MU forums "

    No, it's not there, Skippy.

    What's wrong with it, is that you get folks who have not a clue about the level of involvement and knowledge required to successfully run this software. They think, "Oh, it's wordpress, and it's 5 minute simple." Survey says: XXX

    Some hit the books and learn, other want everything spoon fed to them, as they are too lazy to google, learn php (or other skills), and think that just because this is "open source" that they should have their hand held.

    That's the WP forums for ya. Hand hold the clueless. We're all supposed to be at the server level, more advanced, and also web hosts as well. The overall IQ of the folks here should be much more on plane with the basics. Yet, the overall feel is the IQ of a salad bar, with some rough gems on occasion.

    Think the second sticky on the front page is there just for amusement?

    "I don't think so, Tim."

  26. andrea_r
    Moderator
    Posted 14 years ago #

    "just as open source should be, open!"

    Well it's not like that info was hidden... it's all over the codex, as it's not MU-specific. Any plugin out there for WP & MU that tapped or hooked into the footer says the same.

  27. bschwarting
    Member
    Posted 14 years ago #

    i'm not sure i ever said it was hidden, but, what I, like most users in here would like, is just a point in the right direction. a simple link, or say search for "hook into wp_footer" would have been suffice.

    if you don't know the right terminology, it's nearly impossible to search.

    thanks again MrBrian!

  28. Konstan
    Member
    Posted 14 years ago #

    I'd just like to say that supposedly this is fixed in the upcoming FireStats 1.6 because I was having the same problem and instead of just deleting the thing I talked with the coder and sent him some info which was helpfull.

About this Topic

  • Started 14 years ago by bschwarting
  • Latest reply from Konstan