Skip to content

Document deduplication, what is sent, consent and worker mode - #55

Merged
loevgaard merged 1 commit into
masterfrom
fix/31-readme
Sep 14, 2026
Merged

loevgaard merged 1 commit into
masterfrom
fix/31-readme

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Fixes #31

Stacked on #54.

The earlier PRs in this series already added the pipeline table, the enrichment example, the logging channel, the async routing rationale and the test event code lifecycle. This one closes the remaining gaps from the issue.

Deduplication between the browser and the server

With both sides on, the same event is sent twice on purpose. Nothing said so, or explained why that is fine: Event::$eventId is generated in the constructor and used as eventID in the fbq() call and event_id in the api payload, so Meta collapses the pair. Also spells out the one case where it breaks, namely assigning ids yourself and not using the same one on both sides.

What is sent to Meta

A table of the four fields the bundle fills in by itself, plus the two things worth checking in the application:

  • framework.trusted_proxies has to be configured, or getClientIp() returns the load balancer's address and every visitor looks identical.
  • event_source_url is the full url including the query string, with a one-line listener for stripping it.

Also states that personal data is hashed before it leaves the server and is not written to the transport.

Consent

What actually happens while consent is not granted: events are still built and enriched, but no tags are rendered, no command is dispatched, and neither cookie is written, each logged at debug level. And that everything counts as granted when the consent bundle is absent or the option is off.

Long running runtimes

Requirements now state that FrankenPHP worker mode, RoadRunner and Swoole are supported, since the cached contexts are reset between requests.

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.49%. Comparing base (0c26905) to head (e045401).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #55   +/-   ##
=========================================
  Coverage     90.49%   90.49%           
  Complexity      148      148           
=========================================
  Files            31       31           
  Lines           484      484           
=========================================
  Hits            438      438           
  Misses           46       46           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@loevgaard
loevgaard changed the base branch from fix/33-housekeeping to fix/29-cookie-domain September 14, 2026 08:13
Fill the remaining gaps in the README: how the browser and server events
are deduplicated, exactly which request data is sent to Meta and the
trusted_proxies and query string caveats that come with it, what happens
while consent is not granted, and that long running runtimes are
supported.

Fixes #31
@loevgaard
loevgaard changed the base branch from fix/29-cookie-domain to master September 14, 2026 09:23
@loevgaard
loevgaard merged commit b944058 into master Sep 14, 2026
@loevgaard
loevgaard deleted the fix/31-readme branch September 14, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README: enrichment example, deduplication, data sent to Meta, test event code lifecycle

1 participant