Skip to content

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

Description

@loevgaard

The README covers installation and configuration well but leaves out the parts integrators ask about most:

  1. Enriching events. The core value of the Conversions API is server-side user data (email, phone, external id, address). There is no example of a listener that adds these. Add an #[AsEventListener(ConversionsApiEventRaised::class)] example that sets userData->email[] and userData->externalId[] from the logged-in user, and state that normalisation and hashing are done by the SDK at send time.
  2. Deduplication. When both client side and server side are enabled the same event is sent twice on purpose. Explain that Event::$eventId is generated in the constructor and used as eventID in the fbq() call and as event_id in the API payload, so Meta deduplicates them, and that applications creating their own ids must set the same id on both.
  3. What is sent. PopulateRequestPropertiesSubscriber sends the full request URL including the query string ($request->getUri()) as event_source_url, the client IP (respecting trusted proxies) and the user agent. Say so, and mention framework.trusted_proxies, otherwise the IP is the load balancer's.
  4. Test event code. Explain how to clear the code and in which environments the query parameter is honoured (Test event code via query parameter is unauthenticated, cannot be cleared and crashes apps without sessions #15).
  5. Pipeline and priorities. Document the event pipeline and expose priority constants #22.
  6. Async is the expected setup. Synchronous handling by default: Meta failures become visitor-facing 500s and every page waits for Meta #16.
  7. Consent. One sentence on what happens without consent: events are still built and enriched but neither rendered nor sent, and no cookies are written.
  8. Worker-mode runtimes. Once Cached fbp/fbc contexts keep state across requests and are never reset (worker-mode runtimes) #13 is fixed, state that FrankenPHP worker mode and similar runtimes are supported.
  9. Suggested packages. The README tells users to install symfony/http-client and nyholm/psr7; also list them under suggest in composer.json so Packagist and composer suggest show it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions