• Resolved Bobby

    (@bobbix)


    I have installed Statify and would like to display the pageviews on a website. So far I have recorded the pageviews with another plugin. How can I transfer the previous number of page views in Statify so that Statify continues counting from this information and do not count from 0.

    Thank you very much for your reply.

Viewing 1 replies (of 1 total)
  • Plugin Support Stefan Kalscheuer

    (@stklcode)

    You can fill the database yourself and migrate data from the other system. The model is quite simple, one row per visit.

    Sample SQL (replace “wp“ if changed):
    INSERT INTO wp_statify(created, referrer, target) VALUES ('2020-07-17', 'https://www.pluginkollektiv.org', '/some/page');

    or if you prefer PHP with WP logic:

    $wpdb->insert(
      $wpdb->statify,
      array(
        'created'  => '2020-07-17',
        'referrer' => 'https://www.pluginkollektiv.org',
        'target'   => '/some/page',
      )
    );

    Referrer and target optional, if only daily counts are of interest. If you have aggregates like date => count, you have to add that much entries.

    Remember configuring an adequately long storage time, otherwise the data is cleaned up automatically ??

    Cheers,
    Stefan

Viewing 1 replies (of 1 total)
  • The topic ‘Pageviews do not count from 0’ is closed to new replies.