WooCommerce Dynamic Sorting

plugin banner

WooCommerce plugin that links up with Google Analytics to sort products based on page views and visits.

Author:Phill Brown (profile at wordpress.org)
WordPress version required:3.1
WordPress version tested:3.7.36
Plugin version:1.0
Added to WordPress repository:12-01-2014
Last updated:12-01-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://pbweb.co.uk/
Total downloads:1 593
Active installs:10+
plugin download
Click to start download

Dynamic Sorting is a lightweight WooCommerce plugin that links up with your Google Analytics account and allows you to sort products based on a website’s usage statistics. Out the box, it adds two ordering options – sort by views and sort by visits.

Google Analytics sorting options can be hidden from the user facing sorting dropdown. This means you can set the default sorting order to feature your shop’s most popular products without your customer knowing.

There is also a premium version of the plugin called Sort by Google Analytics that lets you sort any post type by any Google Analytics metric. WooCommerce Dynamic Sorting works with the product post type and supports sorting by pageviews and visits.

The Indexer

For performance reasons the plugin operates off a locally downloaded index of Google Analytics data. The indexer runs twice a day and you can trigger it manually through the Dynamic Sorting Settings section in the Catalog tab in WooCommerce Settings. Once the indexer has run at least once, the plugin is ready to use.

To increase the batch of the indexer to 400, add the following code to your plugin or theme:

add_filter( 'woocommerce_dynamic_sorting_indexer_data_batch_size', create_function( '', 'return 400;' ) ); 

Requirements

  • WordPress 3.1+
  • WooCommerce 1.0+ plugin installed
  • PHP cURL extension
  • PHP JSON extension
  • Google Analytics Account