Google Analytics Top Content Widget – WordPress Plugin
Adds a widget that allows you to display top pages/posts in your sidebar based on google analytics data.
Requires a Google Analytics account, and the plugin, “Google Analytics Dashboard” (which will be auto-installed by this plugin, thanks to @jthomasgriffin‘s awesome TGM Plugin Activation Class).
Also includes a shortcode to display the top content in your posts and pages.
Shortcode with options supported:
The "Google Analytics Top Content" widget requires the plugin, "Google Analytics for WordPress by MonsterInsights", to be installed and activated.
Shortcode in action:
The "Google Analytics Top Content" widget requires the plugin, "Google Analytics for WordPress by MonsterInsights", to be installed and activated.
Shortcode attributes definitions:
- Pageviews: Show pages with at least __ number of page views
- Number: Number of pages to show in the list
- Showhome: Will remove home page from list: (usually “yoursite.com” is the highest viewed page)
- Time: Selects how far back you would like analytics to pull from. needs to be in seconds. (1 hour – 3600, 1 day – 86400, 1 month – 2628000, 1 year – 31536000).
- Time Value: time=2628000 timeval=2 like in the example above would be 2 months.
Since 1.3:
- titleremove: Remove site title from listings. (Unless your site doesn’t output the site titles, then you will need to add this in order for the filter settings below to work.)
- contentfilter: Limit listings to a particular post-type (post, page, etc)
- catlimit: Limit listings to specific categories. (comma separated category ID’s)
- catfilter: Remove listings in specific categories. (comma separated category ID’s)
- postfilter: Remove specific posts/pages, etc by ID. (comma separated post ID’s)
All of the widget options are exactly that.. optional. If you don’t include them it will pick some defaults.
Plugin Features:
- Plugin uses WordPress transients to cache the Google results so you’re not running the update from Google every time. cache updates every 24 hours.
- Developer Friendly. Many filters built in to allow you to filter the results to dispay how you want. One example of that would be to remove your Site’s title from the results. (now unnecessary, as the widget/shortcode has the option built in)
Plugin available for download here!
Any hack to bring in a thumbnail?
Hi, i have this error:
Warning: get_class() called without object from outside a class in /home/…/public_html/wp-content/plugins/google-analytics-top-posts-widget/vendor/tgm-plugin-activation/class-tgm-plugin-activation.php on line 2866
Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /home/…/public_html/wp-content/plugins/google-analytics-top-posts-widget/vendor/tgm-plugin-activation/class-tgm-plugin-activation.php on line 2866
Any help? Thanks.
Any hack to display custom field value below the title?