Overview and External API

With version 1.2.3 even Overview is working as for Dashboard with the External API.

You need to activate External API in order to see the Overview as before.

Please refer into this image on how to achive it (the Key is Random and generated with the apposite key):

External API activation

External API activation

Remember that we are working for using the External API in all part of the plugin for speed up generation of page

Thanks

19 Responses to Overview and External API

  1. f2x ha detto:

    Please explain to me this new “External API” requirement. Does this mean that to view my website’s stats I have to contact an outside server other than my own?

  2. newstatpress ha detto:

    Hi,

    absolutely not.

    For speed up page generation we use Ajax asyncronous page generation, so there will be a POST call to a page of YOUR server that gives the result when ready, but you page has already finished to load (so no more 404 errors happens).

    For example, for this site, the page is http://newstatpress.altervista.org/wp-content/plugins/newstatpress/includes/api/external.php

    If you click on it you will get and “Invalid use of API” as the page need a POST calling with the appropriate parameters.

    The most important is that it uses a KEY to autenticate the user that are accessing, so only who had the key can see the result.

    Using it from NewStatPress means that itself take the KEY and use it, so you only need to activate the API and choose a KEY (better a random big one, as you had not to type it).

    But now you had a more important result: from another site you can see your NewStastPress result showed in it, if you make a POST call to your site with appropriate result and the right KEY.

    What is this useful?
    If you had only one installation of NewStatPress it not make much difference (unless the speed up page generation), but if you had 10 or 100 sites that you are monitoring, with the External API you can from a unique site to see the statistics of all your site in one place.
    You don’t need to enter each sites ad see overview, but simply see all overviews in one page.

    Inside the document directory there is the PDF of how the POST call can be executed with all paramethers described.

    It is called EXTERNAL because your server can now gives result to other servers, but only to autorizated servers (the ones that has the KEY you select as password for the API).

    Finally the External API are able to gives result in HTML (so the graph you see into the Overview page), or in JSON format, so in a way you can elaborate and uses to produce different pages.

    Let me know if this help you.

    Thanks

  3. f2x ha detto:

    It helped me very much! Thank you for explaining that so thoroughly. I’m really glad you took over StatPress and continued to maintain it. Using NewStatPress really helps me know how many people are visiting my site and what region they are from without compromising their privacy. That means a lot to me (and them too). In a way, it also helps me recognize and mitigate referral spammers, scrapers, and hacked server botnets when they happen as well. All in all, a very useful plugin.

    Thanks!

  4. Jay Doggett ha detto:

    Hi I attempted to activate the API as directed, but the setting does not stick. I do not see this field in the DB. In fact, it doesn’t look like the DB is updated with any new fields at all.

  5. newstatpress ha detto:

    Are you using MultiSite function of WordPress?

    Thanks

  6. Jay Doggett ha detto:

    No, I am not

  7. newstatpress ha detto:

    Could you send a screenshot at newstatpress [at] altervita.org of API setting?
    Thanks

  8. Jay Doggett ha detto:

    I set it, click save and nothing happens. When I go back to that setting tab my selections are cleared. They are not being saved.

  9. newstatpress ha detto:

    try to deactivate the plugin and then reactivate.

    now go to see if the option stay if set.

    thanks

  10. Jay Doggett ha detto:

    I tried that too. I also tried uninstalling and re-installing the plugin. No matter what I do the setting does not save. I checked the DB and see no field in the table to store these settings.

  11. newstatpress ha detto:

    What about the other option of the plugin? If you change something (like number of entries to show), did they stat?

  12. Jay Doggett ha detto:

    No, none of the settings stay. None of them.

  13. Jay Doggett ha detto:

    I turned on wordpress debugging to see where the error is. This is the output:

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method NY_OG_Main_Admin::wpog_add_pages() should not be called statically in wp-includes\plugin.php on line 525

  14. newstatpress ha detto:

    Have you that error even with NewStatPress disabled?

    I suspect another plugin is conflich with newstatpress as NY_OG_Main_Admin::wpog_add_pages() is not called directly by NewStatPress.

    are you using cache plugin?

    thanks

  15. Jay Doggett ha detto:

    No, I am not using a cache plugin.

  16. Geronimo ha detto:

    Is NewStatPress GDPR compliant? Is NewStatPress send the data like visitor IP or referrer to external server?

  17. newstatpress ha detto:

    hi,

    all data is stored into the DB where the WordPress is installed and are not send to external server at all.

    Please take present that this is already true even without GDPR normative as Worpress plugin giudeline proibit to send data to external server unless user make explicit consense for that by abilitate it.
    Code that send data to external server without this option are removed from the Worpress repository by plugin reviewers.

    thanks

  18. [email protected] ha detto:

    All of a sudden my new stat press stop showing any stats 00000000

    Please help!

  19. newstatpress ha detto:

    please write a mail to newstatpress @ altervista.org
    thanks

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.