An addon plugin to WP Analytify that adds new shortcode: analytify_top_content.
Why do I need it?
To show accurate most popular posts list without killing your server/database
How it works?
Shortcode allows users to fetch top pages from Google Analytics and show them as a list. Global options page allows you to exclude some particular pages across whole website if you’re using more than one shortcode on it. “Hostname” parameter was added to allow WPML / Polylang / other languages solutions work well (this way you can skip particular domain in particular place).
Technical details: when shortcode is fired – plugin will look for data stored in WordPress internal cache (transient). If no luck – new request through Analytify will fetch data from Analytics and keep it in transient for another visitors.
How will it look like?
It’ll be list of images and titles which should grab styles from your website. If there will be need for that – we’ll add predefined styles too, but we believe it’s better to keep it on theme side and leave styling to developers if needed. (if you’d need that – we offer custom development too, just let us know in comments)
How to use?Available parameters:
- period – defines time period we want to get (like: “2 months”, “last month”, “last 3 weeks”). Required
- to – when period does not contain a word “last” we need to define point in time which is the last day of required period (so 2 weeks to 2018-12-01 is between 2018-11-14 and 2018-12-01)
- limit – number of rows we want to show
- exclude-home-page – pass “yes” if you want to exclude home page (which gets the most number of views usually) from results
- post-type – required post type in results
- title-remove – text we want to remove from the page title
- except-ids – post IDs we want to skip from the result
- except-urls – post urls we want to skip from the result
- hostname – adds ability to filter by hostname (i.e. page in different language)
This plugin has global settings support for except-ids, except-urls and exclude-home-page options
**1.2 (2019-01-15)** * NEW: Global options for Top Content shortode (found in Analytify -> Settings -> Shortcodes global settings) **1.1 (2019-01-14)** * NEW: Possibility to exclude certain post IDs or urls from appearing in the result * NEW: Ability to select base hostname from Google Analytics (i.e. for different language pages) **1.0 (2018-12-27)** * First release