Forward snowplow events from frontend

Problem

We have added the event forwarder that is currently behind a feature flag. Issue: Implement event forwarder (#510317 - closed)

https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/event_forward/event_forward_controller.rb

Now we want to configure the frontend to send events to the event forwarder.

Desired Outcome

When the collect_product_usage_events feature flag is enabled events frontend event will be forwarded.

The implementation should handle events as described in the requirements: https://gitlab.com/gitlab-org/architecture/gitlab-data-analytics/design-doc/-/issues/131.

In short, that means that event forwarding should respect the toggle but some Duo events should always be forwarded.

Potential Solution

The original POC can be used as inspiration: !178838 (diffs)

Documentation Update Needed

  • Yes
  • No

How to verify

Further actions needed