i’ve recently integrated Matomo into a WordPress setup that uses a lightweight custom theme. tracking works fine overall, but i’ve noticed a small delay in page load time since adding the tracking script — especially on pages that use external assets.
for example, on https://pojavlauncherdl.com/, the delay shows up mostly on first load when using Matomo’s JS tracking.
i’ve already tried async loading and moving the script to the footer, but it still adds ~300–500ms to the TTFB.
has anyone else dealt with similar theme-level performance dips after adding Matomo?
would love to know if there’s a better placement or optimization trick for smoother tracking.
Hi @KenKanekigh To help you out with this, you could check a few things:
Matomo server response time: Make sure your Matomo instance isn’t adding latency — a slow tracker endpoint can delay the first request.
DNS & network lookup: If you’re using a different domain for Matomo, try preconnecting (<link rel="preconnect" href="``https://matomo.example.com``">).
Cache headers: Confirm static assets from your theme and Matomo JS are properly cached and compressed (GZIP/Brotli).
Plugin placement: Ensure the tracking script is as close to the closing </body> tag as possible and only loaded once.
Self-hosted optimization: If self-hosted, consider using the Matomo Tracker Proxy to reduce external calls.
These usually help reduce the small TTFB delay you’re seeing.