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

Change tinybird event format #7272

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Change tinybird event format #7272

merged 2 commits into from
Sep 26, 2024

Conversation

FelixMalfait
Copy link
Member

Separate pageview analytics from core events

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR modifies the analytics event format in the Twenty server, separating pageview analytics from core events and simplifying the AnalyticsResolver.

  • Updated AnalyticsService in packages/twenty-server/src/engine/core-modules/analytics/analytics.service.ts to use different datasources for pageview and other events
  • Simplified AnalyticsResolver in packages/twenty-server/src/engine/core-modules/analytics/analytics.resolver.ts by removing unused imports and parameters
  • Introduced a switch statement in AnalyticsService to handle different event types, particularly distinguishing pageview events
  • Fixed a bug in the analytics enablement check within the AnalyticsService

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines +65 to +68
const datasource =
createEventInput.action === 'pageview'
? 'pageview'
: this.defaultDatasource;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: This logic duplicates the check from the switch statement. Consider refactoring to avoid repetition.

@FelixMalfait FelixMalfait merged commit 2f41e14 into main Sep 26, 2024
5 checks passed
@FelixMalfait FelixMalfait deleted the fix-analytics-3 branch September 26, 2024 15:24
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.

1 participant