Bars represent ad views. The scale is shown on the left side. (Each ad is counted individually, so if you are
showing an Ad Buttons ad block with 4 ads in your sidebar, you should see numbers four times as high as your page
view count)
Lines show the number of ad clicks for each day. The scale is shown on the right side of the graph.
"; // CLEANUP PROCEDURE $wpdb->query("INSERT INTO ".$wpdb->prefix."ad_buttons_stats_hst(abs_view, abs_click, abs_dat) SELECT sum(abs_view) , sum(abs_click), abs_dat FROM ".$wpdb->prefix."ad_buttons_stats WHERE EXTRACT(YEAR_MONTH FROM abs_dat) < EXTRACT(YEAR_MONTH FROM CURDATE()) GROUP BY abs_dat ORDER BY abs_dat"); $wpdb->query("DELETE FROM ".$wpdb->prefix."ad_buttons_stats WHERE EXTRACT(YEAR_MONTH FROM abs_dat) < EXTRACT(YEAR_MONTH FROM CURDATE())"); echo "done..."; } $old_total = $wpdb->get_results(" SELECT count(*) as cnt FROM ".$wpdb->prefix."ad_buttons_stats WHERE EXTRACT(YEAR_MONTH FROM abs_dat) < EXTRACT(YEAR_MONTH FROM CURDATE()) "); foreach($old_total as $old){ $old_records = $old->cnt; } if ($old_records > 0) { echo "Total old records: "; echo $old_records; echo " cleaning up old records will free up space in the database. The daily totals will still be available for viewing here."; echo "clean up now"; } ?>
Stats are a work in progress, stay tuned for updates! You can help speed things up!