
內容簡介
動態排序是一款輕量的 WooCommerce 外掛程式,可以連接到你的 Google Analytics 帳戶,讓你可以根據網站的使用統計資料對產品進行排序。它提供了兩種排序選項 - 按瀏覽量排序和按訪問量排序。
Google Analytics 的排序選項可以從用戶頁面的排序下拉菜單中隱藏,這意味著你可以將默認排序順序設置為展示你商店最受歡迎的產品而不讓客戶知道。
此外,還有一個高級版的插件叫做 Sort by Google Analytics (按 Google Analytics 排序),可以讓你根據 Google Analytics 的任何指標對任何文章類型進行排序。WooCommerce Dynamic Sorting 可以與產品文章類型一起使用,支持按頁面瀏覽量和訪問量進行排序。
搜尋器
出於性能考慮,此插件基於本地下載的 Google Analytics 數據索引進行操作。搜尋器每天運行兩次,你還可以通過 WooCommerce 設置中的 Catalog 標簽中的 “Dynamic Sorting Settings” 部分手動觸發它。一旦搜尋器運行過至少一次,該插件即可使用。
如果要將搜尋器的批次增加到400,請將以下代碼添加到您的插件或主題文件中:
add_filter( 'woocommerce_dynamic_sorting_indexer_data_batch_size', create_function( '', 'return 400;' ) );
要求
WordPress 3.1+
已安裝 WooCommerce 1.0+ 擴充套件
PHP cURL 擴充套件
PHP JSON 擴充套件
Google Analytics 帳戶
外掛標籤
開發者團隊
原文外掛簡介
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
