PHPackages                             smile/simple-page-view-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smile/simple-page-view-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

smile/simple-page-view-bundle
=============================

An easy way to include a light and simple page view counting system in your website

v1.0(11y ago)0131MITPHP

Since Feb 26Pushed 11y ago4 watchersCompare

[ Source](https://github.com/Smile-SA/SimplePageViewBundle)[ Packagist](https://packagist.org/packages/smile/simple-page-view-bundle)[ Docs](https://github.com/Smile-SA/SimplePageViewBundle)[ RSS](/packages/smile-simple-page-view-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Introduction
============

[](#introduction)

The SimplePageViewBundle is an easy way to include a light and simple page view counting system in your website.

It does not provide session management. All page displayed (refreshed, F5, ...) are processed.

\#Installation

Step 1: Download Bundle with composer
-------------------------------------

[](#step-1-download-bundle-with-composer)

`composer require "smile/simple-page-view-bundle:~0.1"`

Step 2: Enable the Bundle
-------------------------

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel :

```
//app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Smile\Bundle\SimplePageViewBundle\SmileSimplePageViewBundle(),
    );
}
```

Step 3: Enable the route
------------------------

[](#step-3-enable-the-route)

In app/config/routing.yml, load the bundle route :

```
smile_simple_page_view:
    resource: "@SmileSimplePageViewBundle/Controller/"
    type:     annotation
    prefix:   /

```

Step 4: Update database schema
------------------------------

[](#step-4-update-database-schema)

Run the update database schema command :

`php app/console doctrine:schema:update --force`

Utilisation:
============

[](#utilisation)

Twig function
-------------

[](#twig-function)

Enable the collect of information in a page using the following Twig function :

```
{{ smile_page_view(pageType, pageId) }}
```

The pageType is used to explain what the type of page you are currently in (for example if your application is a news article, you can put in type 'news' ).

pageId is the unique identifier of the current page element (for example the numerical id of your article). It is not mandatory.

Batch
-----

[](#batch)

In order to aggregate and compress page view data, you must run the batch `php app/console smile:pageviews:aggregate`.

You can add it in a cron task (we advise to run it once each day)

This batch compress data by type, id and date in the table `smile_page_view_stats` and remove the processed entries from the table `smile_page_view_storage`.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4090d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c158652d318dfb93e48bdda8c3c514ed91b7c0ae7e848e33c99bf8efd852c9d6?d=identicon)[smile-sa](/maintainers/smile-sa)

---

Top Contributors

[![jbouzekri](https://avatars.githubusercontent.com/u/880996?v=4)](https://github.com/jbouzekri "jbouzekri (2 commits)")

---

Tags

symfonybundletrackingPage view

### Embed Badge

![Health badge](/badges/smile-simple-page-view-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/smile-simple-page-view-bundle/health.svg)](https://phpackages.com/packages/smile-simple-page-view-bundle)
```

###  Alternatives

[ekreative/uuid-extra-bundle

Paramconverter, Normalizer and Form Type for Ramsey Uuid

18168.6k](/packages/ekreative-uuid-extra-bundle)[fsi/datagrid-bundle

FSi Datagrid Bundle

1859.8k1](/packages/fsi-datagrid-bundle)[bornfreee/tactician-domain-events-bundle

Bundle to integrate Tactician Domain Events library with Symfony project

10138.6k](/packages/bornfreee-tactician-domain-events-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
