• Resolved justgert

    (@justgert)


    Hello team,

    I have a question: It now is possible to reset the data and start fresh. Is there also a way to reset just a part of the data ? With a part I would mean everything except total pageviews/visitors per post.

    Referrers could be reset monthly or even weekly for example,

    Reason for asking is that the database is growing rapidly. I started using Koko in June 2022. It now is 375 MB. Last month (October ’23) I had 626 K visitors and 3,82 M pageviews. So, that is about 22 MB/month.

    Best regards,
    Gert

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hello @justgert,

    Nice, it’s always cool to hear about real-life cases running Koko Analytics on larger sites.

    The hardest part about this feature request is the user interface for it, as it’s just a matter of periodically running some SQL queries against the database. Do you perhaps happen to have WP CLI installed on your server? That way we could start out by offering a WP CLI subcommand for it that you can then run periodically (eg as a cronjob).

    Alternatively, if you don’t mind executing SQL directly, you can run the following database query to delete all referrer stats before Dec 31, 2022.

    DELETE FROM wp_koko_analytics_referrer_stats WHERE date < '2022-12-31';
    
    

    If you use a custom database table prefix then you may have to change the table name for the above query to work.

    Let me know if that helps and how we can help make this easier please.

    Thread Starter justgert

    (@justgert)

    Hi Danny,

    Thanks again for your fast reply!
    Currently around 7K pageviews per hour, so things are going well and Koko is running smooth ?? Not 1 problem sofar.

    I don’t mind executing SQL directly, so thanks for this!

    Best regards,
    Gert

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pruning, but not everything’ is closed to new replies.