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

Register a pageview

Pageviews are registered by a specially generated image. The image url is signed with a secret key so malicious users cannot easily tamper with your pageviews.

To show the image for an entry:


{# render the image for registration #}
{{ entry | views_work_image }}

Weighted pageviews

Sometimes you'd want a pageview to count less than others. This can happen if you use pageviews as a popularity index and want to balance. In that case you can pass a weight factor to the image. In the case below, the factor is 1.5; every 2 pageviews, an extra pageview is counted on average.


{# render the image for registration #}
{{ entry | views_work_image({factor: 1.5}) }}