matomo-org / matomo-org/plugin-QueuedTracking

QueuedTracking intercepts bulk JSON requests it cannot process, silently dropping all events

Open
#320 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
87
Forks
41
Avg merge
2d 18h
Merged PRs (30d)
7

Description

When QueuedTracking and BulkTracking are both active, QueuedTracking hooks `Tracker.newHandler` first and replaces the handler unconditionally.

Because PHP only populates `$_GET`/`$_POST` for form-encoded bodies, a bulk request sent with `Content-Type: application/json` leaves `RequestSet` empty by the time the handler runs. `Queue::addRequestSet()` silently discards it at the `!$requests->hasRequests()` guard.

Any application using the [Bulk Tracking API](https://developer.matomo.org/api-reference/tracking-api#bulk-tracking) alongside QueuedTracking loses all tracking data without any error signal.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the interaction between QueuedTracking and BulkTracking at Tracker.newHandler, then follow the RequestSet flow into Queue::addRequestSet(). Reproduce a Bulk Tracking API request with Content-Type: application/json while both features are active. Done means bulk events are no longer silently discarded and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.