=== Plugin Name === Contributors: ChemicalSailor Tags: stats, browser, screen, ajax Requires at least: 3.1.4 Tested up to: 3.3 Stable tag: 0.5 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YG6P2JSSRLDJC&lc=GB&item_name=Tom%20Fletcher¤cy_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted Records browser window size for each page load and makes data available for administrators. Also counts visits by registered users. == Description == Often site visitors view websites using a browser window that can be much smaller than the screen resolution, yet sites are often designed based on popular screen resolutions or generalised parameters. This plugin runs a small piece of javascript on each page load to measure the browser window size and screen resolution, sending it back to the server to be stored in the database. This gives you a better understanding of the how visitors actually view your site: whether a wide range of viewports are in use, or if most visitors use a very similar window size. Data is stored on a per visit basis, which contains each visitors page views. A visit times out after 15 minutes of inactivity (no more page loads). Visits made by registered users are also counted, and data is collected for page views in the admin area (your own visits are important too!) except for the plugins own stats page. There is a page in the admin area for viewing basic stats, which allows all the recorded data to be downloaded in CSV format for analysis in your favourite statistics package. == Installation == 1. Download and unpack .zip file 1. Upload `browser-window-stats` directory to `wp-contents/plugins/` directory 1. Activate plugin through the Plugins menu in WordPress == Screenshots == 1. The stats page in the admin area == Changelog == = 0.5 = * Added dashboard stats page for viewing brief stats and download of data in CSV * initial release = 0.4 = * fixed issue with safari top sites skewing stats = 0.3 = * save browser resolution in array for each page view per visitor * session ended after 15 minutes inactivity * stopped ajax call when page loaded in iframe = 0.2 = * jQuery ajax call = 0.1 = * database creation function * scripts enqueued * receive and save data == Other Notes == Hooks are provided in the plugin to modify the stats table. To change the time periods displayed use the `bws_columns` filter. Just modify the array with new entries containing DateTime objects as per the example: `modify( '-60 days' ); return $columns; } add_filter( 'bws_columns', 'add_60_days' ); ?>` To change the table rows use the `bws_rows` filter, which allows you to add your own stats functions in a similar way to the above: `` In the stats function above arrays of data are passed to the function. Other keys that may be accessed are: * `$data['num_visits']` (int) The number of visits * `$data['num_registered_visits']` (int) The number of visitors made by registered users * `$data['num_page_views']` (int) The number of page views * `$data['num_registered_page_views']` (int) The number of page views made by registered users