statisticscounttypo3impressions

TYPO3: How to count page impressions on every page with an extension


I need to count the page impressions of every page on a TYPO3 site into the db. So I think I need an extension which is called on every page impression and increase a column 'impressions' in the db of the specific page.

I'm new to typo3 and new to extension development as well. Is there a way to include an extbase-extension on every page so some php-script get called?

(Update)
I want to add more information: I don't need a counter which counts all PIs. The counter needs to be page-related. So it make sense to extend the pages-table from Typo3. Another need is that the extension should be done with extbase.


Solution

  • I'm new to typo3 and new to extension development as well. Is there a way to include an extbase-extension on every page so some php-script get called?

    Once your plugin is configured you can include it with page.1234 < plugin.tx_yourextension_pi1 on any page. 1234 determines the position on your page. The script should be USER_INT, so it's not being cached (mind you, this will cost loads of performance as previously stated by @norwebian)

    As you don't want to output anything, make sure the controller stays empty as well.