Background
⌘K

TYPO3 Integration

Learn how to integrate Affonso affiliate tracking into your TYPO3 website.

Silvestro
Written by Silvestro
Updated more than a month ago

TYPO3's powerful template system and TypoScript configuration make it flexible to add tracking scripts globally across your enterprise website, perfect for organizations using TYPO3 for their web presence.

Add tracking script to your TYPO3 site

The recommended approach is to add the script via TypoScript in your site configuration, ensuring the script loads on all pages consistently across your TYPO3 installation.

  1. Access your TYPO3 backend

  2. Go to Template module

  3. Select your root page template

  4. Go to Setup field

  5. Add the following TypoScript code:

    page {
      headerData.999 = TEXT
      headerData.999.value (
        <script
          async
          defer
          src="https://affonso.io/js/pixel.min.js"
          data-affonso="YOUR_PUBLIC_PROGRAM_ID"
          data-cookie_duration="YOUR_COOKIE_DURATION"
        ></script>
      )
    }
    
  6. Click Save

  7. Clear all caches (Admin Tools → Flush TYPO3 and PHP Cache)

Find your Program ID →

Alternative: Add the script directly to your Fluid template files in the <head> section, or use the "Additional Header Data" field in page properties.

For more details, see TYPO3's TypoScript documentation and template configuration guide.

Testing

  1. Clear TYPO3 cache after adding the TypoScript
  2. Visit your TYPO3 site with ?atp=test
  3. Check browser DevTools → Console → type window.affonso_referral
  4. Verify tracking in your Affonso dashboard

Note: TypoScript changes require cache clearing to take effect.

Multi-Domain Setup

If you're using TYPO3 only for your main website (e.g., yourcompany.com) and your application runs on a subdomain (e.g., app.yourcompany.com), make sure to install the Affonso tracking script on both domains.

Affonso works seamlessly across subdomains - the same affiliate cookie will be shared between yourcompany.com and app.yourcompany.com. See our multi-domain setup guide for more details on cross-domain tracking.

Next Steps

Once installed, you can access affiliate referral data and pass it to your payment provider. Connect your payment provider →

Was this article helpful?

If you still need help, our support team is here for you.

Contact Support
bg

Ready to Scale Your SaaS?

Affonso is the easiest way to launch your own affiliate program. We take care of the technical stuff, so you can focus on growing your business.