Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    Most likely not, we use the WordPress shutdown hook which isn’t called in the ajax api.

    Thread Starter jamiefuchs

    (@jamiefuchs)

    Okay, thanks for the quick reply!

    If you were to build something like that, what would you recommend? Me to modify what you’ve done already, or build a custom solution from scratch? For the most part I’m just learning how to extend wordpress so I was hoping to find ready-made solutions for most things and this was the closest that I found.

    Plugin Contributor Greg Ross

    (@gregross)

    That would entirely depend on what kind of stats you were looking for. If your looking to track just basic visitors you could make a custom ajax call that would fire off the shutdown function in WP Statistics.

    But if you wanted more detailed information, like what post or pages they “loaded” (not really a page load since you’d be doing it through an ajax call), WP Statistics wouldn’t be able to track that as we record the URL, which for all ajax calls is the same.

    Thread Starter jamiefuchs

    (@jamiefuchs)

    Ah, thank you very much. I will need a bit more detailed information, so I’ll have to create some custom code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Does this work with WP-API?’ is closed to new replies.