Title: Statistics API
Last modified: January 30, 2023

---

# Statistics API

 *  Resolved [jonesuk](https://wordpress.org/support/users/jonesuk/)
 * (@jonesuk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/)
 * How can I place the **Statistics API** code so that users can see how much they
   have used, in like a shortcode?

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

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16424170)
 * Hi [@jonesuk](https://wordpress.org/support/users/jonesuk/),
 * It doesn’t really _work_ this way. I could easily write you some code that would
   allow the user to see how much they have spent, but is it really this amount 
   you want to show?
 *  Thread Starter [jonesuk](https://wordpress.org/support/users/jonesuk/)
 * (@jonesuk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16424179)
 * Hi [@tigroumeow](https://wordpress.org/support/users/tigroumeow/)
 * Great plugin by the way. What what you suggest is the best way for users to know
   how much they have spent or how many messages they have sent so that they can
   know their usage say users get 10,000 messages how can I show the user they have
   already sent 9000 messages and not just have an error message pop up that is 
   unexpected that they have already used all their messages?
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16424227)
 * Actually, it really depends on what you want to show them 🙂 Are you providing
   a free service? Or you want them to pay for it?
 * I guess you would also like to lock their ability to use it if they “consume”
   too much; but based on what? It could the the number of tokens, or the actual
   amount of money you spent for them (but I think it’s private to you, so you shouldn’t
   show that, it could be a % of the amount you want to allow each user to use for
   a month for example).
 *  Thread Starter [jonesuk](https://wordpress.org/support/users/jonesuk/)
 * (@jonesuk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16424567)
 * hi [@tigroumeow](https://wordpress.org/support/users/tigroumeow/)
 * i have implemented the restrictions based on money spent in the stars API but
   if I want to show the user is a certain percentage of their max cost spent say
   $10 can can this be done in either the chat itself or as a short code so for 
   example a message in a short code could say you have used 20% of your allocated
   allowance. This message could be based on being able to set a query like display
   percentage of amount used and you can set the amount to say $10 or $20 dollars
   per month and then do % of this cut off amount. As I want to restrict usage each
   month so that people don’t miss use it. How can this be achieved?
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16436475)
 * Hi,
 * Contact me directly [@jonesuk](https://wordpress.org/support/users/jonesuk/) 
   we’ll find a nice way to add this 🙂

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

The topic ‘Statistics API’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/statistics-api/#post-16436475)
 * Status: resolved