定制 b13/view-tracker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

b13/view-tracker

Composer 安装命令:

composer require b13/view-tracker

包简介

Reliably track page views in TYPO3

README 文档

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

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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-07-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固