Skip to content

Custom HTTP Headers in Matomo Tracking Requests #23972

@SiddhartDhadkar1

Description

@SiddhartDhadkar1

We use a server-side tracking proxy that forwards Matomo tracking requests with server-side authentication. We need to include custom HTTP headers in tracking requests.
Question: Does Matomo JavaScript tracking support adding custom HTTP headers to tracking requests when using:

  1. setTrackerUrl() with a custom endpoint?
  2. Matomo Tag Manager?
  3. Any other Matomo API methods?

Context: We route tracking through /api/MatomoTrackingProxy/Track and need to validate requests server-side using custom headers.
Is there a native way to add custom headers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions