WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
237 stars 187 forks source link

Set up wrangling for events #825

Closed dhruvkb closed 1 year ago

dhruvkb commented 1 year ago

Problem

Whether we want to plug directly into a third party (like Plausible) or build our own analytics solution (using open-source DBs and API frameworks), we need some pipeline to wrangle the events from the frontend to a format acceptable to the service.

Description

In the interest of avoiding vendor lock-in, we can put a thin layer between the frontend and the analytics service, which will receive events from the frontend and will appropriately wrangle and forward them to the right service.

This can be any of the following:

Alternatives

Building a decoupled backend sounds great but in reality, choosing a platform early on makes the most sense as it avoids us having to build our middle layer and we can use native SDKs from the platform to directly ship data to the service.

Additional context

RFC: https://github.com/WordPress/openverse/blob/3fa9f03937d2af356535f158f7f80b20a6bd79d2/rfcs/analytics/20221006-implementation_plan_frontend.md

sarayourfriend commented 1 year ago

@dhruvkb Is this still accurate after the Plausible RFC and analytics implementation PRs?