Skip to content

MAU tracking for unified platform 24.4 #6430

Closed

Description

@mshabarov

Describe your motivation

Count monthly active users (MAU) statistics for Flow and Hilla in Vaadin 24.4+ based on which routing-related entry points are present in the application.

The new definitions are based on which routing entry points are present in the application:

  • A MAU is counted as a Flow user if they have a non-empty route registry and/or exported web component registry. The typical ways of triggering this is through a @Route-annotated class or a class extending WebComponentExporter.
  • A MAU is counted as a Hilla user if they have files in frontend/views that are picked up by the new file-system router and/or if they have a custom client-side router configuration in frontend/routes.ts or frontend/routes.tsx.

Describe the solution you'd like

Data is collected from two different categories: what type of application is developed and what features are actively used.

For the application type the parameters are tracked during project build and statistics tracker look on what the project configuration is in the end, taking into account the content of output build, config and various generated files. Here is a list of them:

  • has-flow-route if RouteRegistry is non-empty.
  • has-hilla-fs-route if the Vite plugin finds something that looks like a view in frontend/views.
  • has-hilla-custom-route if the application has a custom routes.tsx or routes.ts file (i.e. not counting the one in frontend/generated).
  • has-hybrid-routing if has-flow-route && (has-hilla-fs-route || has-hilla-custom-route)
  • has-exported-wc if at least one WebComponentExporter or WebComponentExporterFactory is present in a project.
  • has-endpoint if at least one @Endpoint or @BrowserCallable class is present in the project.
  • has-lit if there's Vaadin-managed Lit components in package.json.
  • has-react if there's a Vaadin-managed React components in package.json.

For the used features the tracking is based on the actual instantiation of objects related to a feature:

  • flow-router if a Flow route has been rendered (ignoring error views), i.e. any Route-annotated Java class is instantiated
  • endpoint-active if there's been at least one call to an endpoint method (cannot use endpoint as the name here since that name has a different meaning in older Hilla versions)
  • exported-wc if an exported web component has been rendered, i.e. a WebComponentExporter Java class is instantiated
  • ReactAdapterElement if a React component wrapper is rendered, i.e. ReactAdapterElement object is instantiated
  • createMenuItems if the automatic main menu in Hilla is rendered, i.e. called at least once.

Describe alternatives you've considered

No response

Additional context

Targets Vaadin 24.4.0

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions