b13 / view-tracker
Reliably track page views in TYPO3
Package info
Type:typo3-cms-extension
pkg:composer/b13/view-tracker
Requires
- php: ^8.2
- typo3/cms-core: ^13 || ^14
This package is auto-updated.
Last update: 2026-07-09 11:52:47 UTC
README
Track page views reliably using a 1x1 pixel that bypasses caching.
For dashboard widgets, analytics, and data aggregation, see View Tracker Pro.
Installation
composer require b13/view-tracker
Including the Pixel
Add the pixel to your main template. Make sure to use the localized page ID if you want to track language versions separately.
Option 1: <img> tag
<img src="/_b13vt?page={data.uid}" style="position: fixed; z-index: -1000;" loading="eager" alt="" />
Option 2: ViewHelper (recommended)
The ViewHelper automatically includes the correct page ID, language, and page type:
<html xmlns:vt="http://typo3.org/ns/B13/ViewTracker/ViewHelpers" data-namespace-typo3-fluid="true"> <vt:pixel /> </html>
Page Module Statistics
View statistics are shown automatically in the header area of each page in the TYPO3 backend. Charts include total views, last 7 / 30 days, last 12 months, and views by page type.
Configuration
Excluded Page Doktypes
By default, view statistics are not shown for non-content page types (folders, shortcuts, external links, etc.). You can extend the exclusion list:
// ext_localconf.php $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['view_tracker']['excludedDoktypes'][] = 116;
Page-module statistics visibility
By default every backend user that can open the Page module sees the statistics widget. Two site settings narrow that audience. Admins always see the widget regardless of these settings.
Import the site set in your config/sites/<id>/config.yaml:
dependencies: - b13/view-tracker
Then override in config/sites/<id>/settings.yaml:
view_tracker: pageModuleStatistics: # Restrict to admin users only — every non-admin loses the widget. visibleForAdminsOnly: true # OR keep visibleForAdminsOnly: false and limit by BE user group UIDs. # Empty (default) means no group restriction. visibleForGroups: '12,17'
Behaviour matrix (non-admin users):
visibleForAdminsOnly |
visibleForGroups |
Non-admin sees widget? |
|---|---|---|
false (default) |
empty (default) | yes — backwards-compatible |
false |
'12,17' |
only if member of group 12 or 17 |
true |
(ignored) | never |
Storage Type
By default, views are written to the tx_view_tracker_count database table.
An empty Redis implementation is provided as an example for alternative storage.
Tracking Endpoint
The middleware listens on /_b13vt by default. The path is deliberately
opaque so common tracker blocklists (EasyPrivacy etc.) don't catch it. If a
blocklist eventually picks it up, override the path per site — both the
middleware and the ViewHelper read from the same site setting.
Import the site set in your config/sites/<id>/config.yaml:
dependencies: - b13/view-tracker
Then override in config/sites/<id>/settings.yaml:
view_tracker: endpoint: '/_yourpath'
After changing the value, flush TYPO3 caches so the ViewHelper re-renders.
Upgrading from 1.0
The tracking endpoint moved from /_pixel to /_b13vt. If your templates use
the <vt:pixel /> ViewHelper, just flush caches — the new URL is emitted
automatically. If you copied the raw <img src="/_pixel?…"> snippet into a
template, update the path manually (or switch to the ViewHelper).
Privacy
The pixel records only the page ID, page type, browser language, and a timestamp. No cookies, IP addresses, or personal data are stored.
License
GPL-2.0-or-later — see the LICENSE file for details.
Related Extensions
- View Tracker Pro — dashboard widgets, data aggregation, and server-side analytics (browser, OS, device type detection)
- View Tracker CDN Country — country detection via CDN headers (Cloudflare, Fastly, etc.)
- View Tracker GeoIP — country detection via MaxMind GeoIP database
Interested in View Tracker Pro or GeoIP? Contact us.
Background, authors & maintenance
This extension was created by Johannes Schlier in 2025 for b13 GmbH, Stuttgart.
Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of our work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.