Skip directly to page content
b13 GmbH

Hauptstätter Str. 59
70178 Stuttgart
Germany
+49 (0) 711 460 589 70 [email protected]

EXT:vgwort—Tracking Pixels in TYPO3, the Easy Way

Bild von David Steeb David Steeb
Icon featuring a stylized letter "A" within a square, set against a light blue background with abstract geometric shapes and documents.

How to add VG Wort tracking to your TYPO3 website with a free extension and just a few minutes of work.

In the first part of this series, we looked at what VG Wort is, why it matters for publishers, and how METIS works. If you missed it, Part 1: VG Wort and TYPO3—What You Need to Know as a Publisher covers everything you need to get started.

Now it’s time for the practical part. You know that VG Wort pays royalties for your online texts, and you know that you need tracking pixels on your pages to get them. The question is how to set this up cleanly in TYPO3, without hacking your templates or pasting tracking codes into your HTML by hand.

The answer is our free, open-source VG Wort extension (vgwort), built to solve exactly this problem.

This Series at a Glance

  • Part 1: VG Wort and TYPO3: What You Need to Know as a Publisher
  • Part 2: EXT:vgwort: Tracking Pixels in TYPO3, the Easy Way (this post)
  • Part 3: VG Wort Pro: Automated Reporting for Professional Publishers

Installation

As with all of our extensions, we rely on Composer. One line is all it takes:

composer req b13/vgwort

The extension supports TYPO3 v13 and v14 and requires PHP 8.2 or higher. That covers the current LTS versions most projects run on.

In Composer-based installations, the extension is active as soon as it’s installed. You don’t need to switch it on in the backend.

Configuration: Add the Site Set

EXT:vgwort uses TYPO3’s site set concept to integrate cleanly with your site. Add the extension as a dependency in your site set’s config.yaml:

1
2
dependencies:
- b13/vgwort
Figure 1: Your site set’s config.yaml with the dependency on b13/vgwort.

That’s basically it. The extension now renders the tracking pixel automatically, right after the opening <body> tag, but only on pages that actually have a pixel assigned. No pixel assigned means no tracking code in the HTML. Nice and clean.

Configure the VG Wort Server

VG Wort spreads its tracking pixels across several subdomains, from vg01.met.vgwort.de to vg09.met.vgwort.de. You’ll see which one applies to your pixels in T.O.M. when you order them. By default, the extension uses vg08. If your pixels use a different subdomain, change it in your settings.yaml:

1
2
3
settings:
vgwort:
domain: 'vg05'
Figure 2: Changing the subdomain in settings.yaml, here to vg05 instead of the default vg08.

Alternative: Render the Pixel Manually with Fluid

In most cases, the automatic integration through the site set is all you need. But if you want more control over where the pixel goes, for example because your template setup is unusual, you can render it yourself with a Fluid partial:

1
2
3
4
5
6
lib.contentElement.partialRootPaths.5 = EXT:vgwort/Resources/Private/Partials

<f:render partial="VgwortTracking"
arguments="{vgwort_pixel: record.tx_vgwort_pixel,
vgwort_domain: site.settings.vgwort.domain}"
/>

Figure 3: Manual rendering with the partial path in TypoScript and the Fluid tag.

In our experience, very few projects need this. Still, it’s good to know the option is there.

How Your Editors Work with It

For editors, the usual workflow barely changes. The extension adds a new VG Wort tab to the page properties with two fields:

Tracking pixel code (tx_vgwort_pixel): This is where you enter the tracking pixel’s public ID. You get it when you order tracking pixels in T.O.M. Each pixel comes with a public and a private code, and the public one goes here.

Ignore page (tx_vgwort_ignore): A checkbox that explicitly excludes a page from VG Wort tracking. This comes in handy for pages that have editorial content but shouldn’t be reported for some reason, like landing pages with little original text or pages that consist mostly of third-party content.

The workflow couldn’t be simpler: open the page properties, switch to the VG Wort tab, paste the pixel code, and save. Done. The next time the page loads, the tracking pixel appears in its HTML automatically.

The Info Module: Keep Track of Everything

When you manage a lot of pages, it’s easy to lose track. Which pages already have a pixel? Which ones don’t? Did an important page slip through the cracks?

EXT:vgwort adds a VG Wort overview to TYPO3’s Info module (Web > Info). There, you can see at a glance which pages have a pixel assigned, which ones are explicitly ignored, and which ones are still missing a pixel. That makes quality control much easier, especially when several editors work on the same site.

Register Custom Page Types

By default, the extension only shows the VG Wort fields on standard pages (doktype 1). If you use custom page types, such as blog articles, news detail pages, or other special doktypes, you can easily register them:

1
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['vgwort']['contentDoktypes'][] = 116;
Figure 4: Enabling a custom doktype (here: 116) for VG Wort in your site package’s ext_localconf.php.

One important note: your site package needs to declare b13/vgwort as a Composer dependency so the configuration loads at the right time. That’s standard TYPO3 practice, but I’m mentioning it anyway because we’ve seen projects trip over it.

A Word on Privacy

The VG Wort tracking pixel is a tracking mechanism, even though it doesn’t set cookies or collect personal data in the traditional sense. You still shouldn’t ignore the topic. In our experience, it’s a good idea to mention the tracking pixel openly in your privacy policy. VG Wort provides sample wording you can add to your privacy page. If in doubt, talk to your data protection officer. On larger projects especially, it’s a step worth taking.

When Is the Free Version Enough?

I’ll be honest: EXT:vgwort is intentionally simple. It’s a single-purpose extension that does one thing well, which is adding tracking pixels to TYPO3 pages.

The free version is the right fit if:

  • You run a smaller blog or a website with a manageable number of pages.
  • Your editors can copy pixels from T.O.M. by hand and assign them to individual pages.
  • You submit your annual report to VG Wort yourself in T.O.M.
  • You don’t need automatic syncing between TYPO3 and VG Wort.

For a blog with 20, 50, or even 100 articles, that’s all you need. You order tracking pixels in T.O.M., assign them in the TYPO3 backend, and report your texts in the portal yourself at the end of the year.

Where It Hits Its Limits

As your page count grows, so does the manual work. That’s where the free version hits its limits:

  • No pixel pool management: You copy each pixel from T.O.M. and paste it into TYPO3 one at a time. With 500 articles, that gets tedious.
  • No author assignment: VG Wort requires every reported text to be assigned to an author. In the free version, that happens entirely outside TYPO3.
  • No automatic text reporting: You register your texts with VG Wort yourself, including title, author, URL, and character count, either directly in T.O.M. or via CSV upload.
  • No API connection: There’s no link between TYPO3 and VG Wort’s METIS interface.

For publishers with hundreds or thousands of articles, multiple authors, and a need for a fully automated workflow, this isn’t sustainable in the long run. That’s exactly why we built VG Wort Pro. More on that in the third and final part of this series.

Coming Up Next: VG Wort Pro

In the next post, I’ll show you how VG Wort Pro automates the entire process: from a pixel pool that fills itself straight from the API, to managing authors in TYPO3, to reporting texts to VG Wort automatically. And if you start with the free version today and need more later, upgrading is seamless.

Try EXT:vgwort and let us know how it goes.

EXT:vgwort is open source and licensed under GPL-2.0-or-later. You’ll find the source code on GitHub at github.com/b13/vgwort. Issues, feedback, and pull requests are welcome.

Written by:

Bild von David Steeb

b13 Founder and CEO, David, is someone you’ll meet if you’re thinking about working with our agency. He is constantly learning new skills and is an influential part of our cutting-edge frontend practice.

David Steeb CEO
more from David Steeb