logGa4Event

Logs a GA4 event for reusable UI components when both the controller and event data exist.