With this extension you are able to count views/clicks of ext:news-records.
Additionally, it adds a new option in the plugin of ext:news to show records ordered by views.
On top there is a scheduler task to automatically reset all counts.
- TYPO3 12 || 13 || 14
- ext:news >= 11.0
- Install the extension by using the extension manager or use composer (
composer req mediadreams/md_news_clickcount) - Include the static TypoScript of the extension
- In the news detail view template add the following code:
{md:getCountImg(newsUid: '{newsItem.uid}')}
Make sure, that you import the namespace to the ViewHelper by adding the following line at the top of the template:{namespace md=Mediadreams\MdNewsClickcount\ViewHelpers}
Note:
- All hits to a news preview have the special parameter
tx_news_pi1%5Bnews_preview%5D. When this is set, not tracking happens. - By default, all hits of logged in backend users will be ignored. Enable visits of logged in backend users in the extension settings, if needed.
- Insert the plugin
News systemofext:newson a page - In
Settingstab selectList view (without overloading detail view)in theWhat to displaydropdown - Select
Viewsin theSort bydropdown - Select a
Sort direction(Descendingwill show the most viewed articles first) - Save and close
In the extension settings, you are able to set daysForNextCount, which adds an IP check. So multiple views of the same
IP address in the given timespan (days) will be counted just once.
By default, this functionality is disabled (daysForNextCount = 0)
ATTENTION:
If you have set daysForNextCount to something higher than 0, please make sure, that you activate the scheduler task
mdNewsClickcount:cleanupLogCommand of type Execute console commands in order to meet the GDPR requirements! This
will clean up the log.
- Add a scheduler task of type
Execute console commands - Select
mdNewsClickcount:clearViewsCommandinSchedulable Commanddropdown
If you find a bug, it would be nice if you add an issue on GitHub.
Thanks a lot to all who make this outstanding TYPO3 project possible!
- Extension icon was copied from ext:news and enriched with a pen from Font Awesome.