Views Work v2.0
Track pageviews and content popularity in Craft CMS
More Craft plugins

Show the pageviews

To show the registered pageviews for an entry in twig (plugin version >=1.3)


<p>
total: {{ entry.viewsWork.total }} 
this month: {{ entry.viewsWork.thisMonth }} 
this week: {{ entry.viewsWork.thisWeek }} 
today: {{entry.viewsWork.today }}
</p>

OLD API <v1.3

The api has changed at version 1.3, but the old api still remains functional.


{% set views = craft.views_work.recording(entry) %}
{# views \twentyfourhoursmedia\viewswork\models\ViewRecording #}

<p>
total: {{ views.total }} this month: {{ views.thisMonth }} this week: {{ views.thisWeek }} today: {{ views.today }}
</p>