[ Sort by Google Analytics is a WordPress plugin allows you to order any post type by any Google Analytic metric. The plugin adds more sorting options to WP_Query’s parameters. This means you can easily use Sort by Google Analytics functionality wherever posts are queried in WordPress. Out the box, it comes with the extra orderby options: pageviews and visits. Some examples: // Order]
Sort by Google Analytics is a WordPress plugin allows you to order any post type by any Google Analytic metric.
The plugin adds more sorting options to WP_Query’s parameters. This means you can easily use Sort by Google Analytics functionality wherever posts are queried in WordPress. Out the box, it comes with the extra orderby options: pageviews and visits. Some examples:
// Order posts by pageviews $most_viewed_posts = get_posts( array( 'orderby' => 'pageviews' ) ); // Order posts by most visited. Those with the same number of visits will be ordered by published date $most_visited_posts = get_posts( array( 'orderby' => 'visits date', ) );
You can also add your own sorting options based on Google Analytics metrics. For example, a fewest bounces sort option or by goal conversion rate. All of this is achievable with 10 lines of code and the most popular requests will be added to the plugin permanently.
No comments:
Post a Comment