Recently Viewed
This plugin adds functionality to the existing Element Query fluent interface allowing you to filter and order elements by whether they have been recently viewed by the user.
Just like 'recently viewed products' on Amazon.
'Views' can be automatically tracked based on URLs visited by the user and displaying is as easy as:
{% set recentBlogPosts = craft.entries.section('blogPosts').recentlyViewed().orderByDateViewed().limit(3).all() %}
The plugin will work with any element type, including Commerce products and any custom elements from other plugins.
If you don't want to auto-track views, or you'd like to track views on elements which can't be natively linked to a specific URL (such as Assets or tags) you can manually track views like so:
{% do craft.recentlyViewed.track(element) %}
Where element
can be anything that implements craft\base\ElementInterface
.
Standard
Plus $5/year after one year.
To install this plugin, copy the command above to your terminal.
This plugin doesn't have any reviews.