Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling events scope in CA #31159

Closed
wants to merge 5 commits into from
Closed

Conversation

freddyDOTCMS
Copy link
Contributor

@freddyDOTCMS freddyDOTCMS commented Jan 17, 2025

We are creating a new model in the CubeJS Schema so called events but what it really mean? and why we need a new model?

First right now we have a couple of model:

  • Events: this is used by Experiment not able right now for Analytics but in the future it should work for both, this model is grouping the Events by session, and it calculate metric that are session aware like "If a Page was reach during the session", "what is the Bounce Rate or Exit rate for a specific page", how you see this metric need work with the whole session, this model should be rename for "session".
  • request: This is used right now for Analytics but it can be used by Experiment in the future, this include request aware metric like if for a specific request was response a PAGE or a FILE if we use URL MAP or VANITY URL (we also can include if a specific RULE was trigger for example)
  • The brand new events model, this is different from the first one and it is ok to be called 'events', this is just the events any of them, for example if a user want to know how many time a custom event was triggered then he need to use this scope, this is not the same that use the request model here because the request one is group by request, also we need a way to retrieve any custom field create by the user for any custom event.

but how we set the model in the CubeJS Query:

This is a query to count how many request we have:

{
    "measures":["request.count"]
}

but if we want to count how many events we have:

{
    "measures":["events.count"]
}

I know that include the model make the query more difficult so maybe we can figure out witch model the user want to use without force him to include it, for example if the user include fields like event_type or event_source then he want to use the event model but if it include field like bounceRateSuccesses success then he want to use the session model and we can use request all the time as default, I still don't know if this is a good idea but I would like to know your opinion about it.

@freddyDOTCMS freddyDOTCMS marked this pull request as ready for review January 29, 2025 17:37
@freddyDOTCMS freddyDOTCMS added this pull request to the merge queue Jan 30, 2025
@freddyDOTCMS freddyDOTCMS removed this pull request from the merge queue due to a manual request Jan 30, 2025
@freddyDOTCMS freddyDOTCMS marked this pull request as draft January 30, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants