Google Analytics Top Content Widget with Analytify plugin

Do you like this plugin?

[ad_1]

To get this product on 50 p.c low cost contact me on this link

 

LIVE PREVIEWBUY FOR $20

An addon plugin to WP Analytify that provides new shortcode: analytify_top_content.

Why do I want it?

To present correct hottest posts record with out killing your server/database

Normally, high content material / hottest posts are calculated by including “+1” in database every time any person visits sure put up or web page. This is okay, when there are usually not many guests, however makes your database very busy as soon as there are extra visits. Caching? Either will cease counting of latest visits, or can be handed by by means of javascript what is going to result in heavy load once more. But in all probability – as a lot of the websites – you’re utilizing analytics. Right? And in analytics panel you’ll be able to see most visited pages for sure date vary. Why not use it as a substitute of duplicating this current function in your web site by yet one more well-liked posts plugin? That’s precisely what we do right here. To hold issues easy and don’t repeat what was already finished by quite a few different plugins, we base our code on free WP Analytify plugin – this fashion you don’t must authorize Analytics once more if you happen to’re already utilizing it (… otherwise you’ll get some further analytics inside WP admin panel as soon as you put in it).

How it really works?

Shortcode permits customers to fetch high pages from Google Analytics and present them as a listing. Global choices web page lets you exclude some specific pages throughout entire web site if you happen to’re utilizing a couple of shortcode on it. “Hostname” parameter was added to permit WPML / Polylang / different languages options work properly (this fashion you’ll be able to skip specific area particularly place).

Technical particulars: when shortcode is fired – plugin will search for information saved in WordPress inside cache (transient). If no luck – new request by means of Analytify will fetch information from Analytics and hold it in transient for an additional guests.

How will it appear like?

As you would like! By default, it’s a listing of titles with hyperlinks. If you wish to modify default outlook – merely copy “shortcode.php” file from templates listing to “wp-analytify-shortcodes” listing withing your (baby) theme. If you wish to have completely different outlook for various put up sorts, merely add there “shortcode-POST_TYPE.php” file – for instance “shortcode-post.php”.

Example of code to make use of in case you’d wish to load further put up information, like featured picture:


<ul>
<?php foreach($rows as $row): ?>
<li>
<?php
world $put up;
//you'll be able to present thumbnail this fashion
echo get_the_post_thumbnail($row->getPostId(), 'thumbnail');
// you'll be able to load all put up information this fashion
setup_postdata( $put up );
//..after which load your template half
get_template_part('template-parts/some_template');
//remember to reset postdata!
wp_reset_postdata();
?>

</li>
<?php endforeach; ?>
</ul>

How to make use of?

Available parameters:

  • interval – defines time interval we wish to get (like: “2 months”, “last month”, “last 3 weeks”). Required
  • to – when interval doesn’t include a phrase “last” we have to outline cut-off date which is the final day of required interval (so 2 weeks to 2018-12-01 is between 2018-11-14 and 2018-12-01)
  • restrict – variety of rows we wish to present
  • exclude-home-page – go “yes” if you wish to exclude residence web page (which will get essentially the most variety of views normally) from outcomes
  • post-type – required put up kind in outcomes
  • title-remove – textual content we wish to take away from the web page title
  • except-ids – put up IDs we wish to skip from the end result
  • except-urls – put up urls we wish to skip from the end result
  • hostname – provides skill to filter by hostname (i.e. web page in several language). Useful if you happen to use WPML, Polylang, or Multisite in several area/subdomain mode and wish to restrict outcomes to present area solely.
  • exclude-items – provides skill to exclude “parents”` or “children”. Useful for instance if you wish to present solely high degree pages or solely well-liked baby pages.

This plugin has world settings assist for except-ids, except-urls and exclude-home-page choices

Do you like this plugin?

Changelog

**1.3.1 (2019-05-09)**
* FIX: Invalid class known as for admin settings

**1.3.0 (2019-05-03)**
* NEW: Ability to exclude high pages or baby pages
* IMPROVEMENT: Code refactoring

**1.2 (2019-01-15)**
    * NEW: Global choices for Top Content shortode (present in Analytify -> Settings -> Shortcodes world settings)

**1.1 (2019-01-14)**
    * NEW: Possibility to exclude sure put up IDs or urls from showing within the end result
    * NEW: Ability to pick base hostname from Google Analytics (i.e. for various language pages)

**1.0 (2018-12-27)**
    * First launch

Support obtainable in Polish and English!

[ad_2]

To get this product on 50 p.c low cost contact me on this link

 

Source

Pomento
Logo
Register New Account
Reset Password
Compare items
  • Total (0)
Compare
0
Shopping cart