Documentazione
Sfoglia la documentazione

Add Privatus Analytics to TYPO3

Add cookieless analytics to TYPO3 with TypoScript headerData in your site package that loads in the Production application context only.

Visualizza come Markdown

Add this to your site package's TypoScript setup, for example Configuration/TypoScript/setup.typoscript:

typoscript
[applicationContext matches "/^Production/"]
  page.headerData.1999 = TEXT
  page.headerData.1999.value (
    <script defer src="https://privatusstats.com/js/pa.js" data-site="pa_YOURSITEID" data-modules="engage,auto,vitals,clicks,ask"></script>
  )
[END]

headerData inserts the content in the head of the page. The condition matches Production and contexts that start with it, such as Production/Staging. TYPO3 reads the context from the TYPO3_CONTEXT environment variable and treats a missing value as Production.

Flush the caches after you change TypoScript. TYPO3 serves full pages, so each page view is counted once. Add other options as attributes.