Title: Callback Function for Post Visit Counts?
Last modified: November 15, 2023

---

# Callback Function for Post Visit Counts?

 *  Resolved [austincarroll](https://wordpress.org/support/users/austincarroll/)
 * (@austincarroll)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/)
 * Hey Ben,
 * I am using your plugin on my WordPress site (love it so far!) and am interested
   in accessing detailed analytics data. Specifically, I’m looking for a PHP callback
   function that can provide the number of visits for individual WordPress posts.
 * The ideal functionality would be a callback that accepts a WordPress `$post` 
   object as input and outputs the number of visits to that post as an integer. 
   If such a function is available, could you please provide guidance on how to 
   implement it?
 * In case this feature is not currently available, any advice on alternative approaches
   or information about future updates including this functionality would be greatly
   appreciated.
 * Thank you for creating such an awesome plugin!
 * – Austin

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/#post-17207433)
 * Hi Austin,
 * Thanks for the kind words about our plugin 🙂
 * We don’t have a PHP callback available right now, but this is something we’ve
   been meaning to add for a while. I’m going to bump this in our roadmap and make
   sure we get it included in the next release.
 *  Thread Starter [austincarroll](https://wordpress.org/support/users/austincarroll/)
 * (@austincarroll)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/#post-17207849)
 * Thanks for the quick response and great news! I’ve been following your work for
   a long time and admire the care you put into your products. Looking forward to
   using this new callback when available 🙂
 *  Plugin Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/#post-17207948)
 * Thanks so much!
 * I’ll post an update here once it’s available.
 *  Plugin Author [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * (@bensibley)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/#post-17366648)
 * Hi Austin,
 * Thanks for your patience with this. We’ve just released version 2.1 and it includes
   a simple dev API.
 * You can use this function to get the stats for an individual page on your site:
 *     ```wp-block-code
       iawp_singular_analytics(int $singular_id, DateTime $from, DateTime $to)
       ```
   
 * And we have more documentation here: [https://independentwp.com/knowledgebase/developer/developer-api/](https://independentwp.com/knowledgebase/developer/developer-api/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Callback Function for Post Visit Counts?’ is closed to new replies.

 * ![](https://ps.w.org/independent-analytics/assets/icon.svg?rev=3504049)
 * [Independent Analytics - WordPress Analytics Plugin](https://wordpress.org/plugins/independent-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/independent-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/independent-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/independent-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/independent-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/independent-analytics/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ben Sibley](https://wordpress.org/support/users/bensibley/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/callback-function-for-post-visit-counts/#post-17366648)
 * Status: resolved