Skip to content

Send analytics to crowd team tenant#1208

Merged
garrrikkotua merged 11 commits intomainfrom
feature/send-analytics-to-crowd-tenant
Aug 4, 2023
Merged

Send analytics to crowd team tenant#1208
garrrikkotua merged 11 commits intomainfrom
feature/send-analytics-to-crowd-tenant

Conversation

@garrrikkotua
Copy link
Copy Markdown
Contributor

@garrrikkotua garrrikkotua commented Aug 2, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 67eae48

This pull request adds support for crowd analytics, a feature that allows sending product usage data to a third-party service for analysis and insights. It updates the track and telemetryTrack modules to send data to both segment and crowd analytics, depending on the event platform. It also adds a new module addProductDataToCrowdTenant that defines a function to send product data to the crowd analytics service. It also adds a configuration option for crowd analytics in default.json.

🤖 Generated by Copilot at 67eae48

To analyze how users behave
We added a feature quite brave
It sends data to crowd
If the config's allowed
But we don't want to send it to segment and save

Why

How

🤖 Generated by Copilot at 67eae48

  • Add crowd analytics feature to send product usage data to a third-party service (link, link, link)
  • Add a new configuration option in backend/config/default.json to enable and configure the feature (link)
  • Add a new module in backend/src/segment/addProductDataToCrowdTenant.ts that defines a function to send data to the crowd analytics service (link)
  • Call the function in the track module after sending data to segment (link)
  • Prevent sending duplicate data to segment if the event is from the crowd analytics platform (link, link, link, link)
  • Import the crowd analytics platform name from the first module to the telemetry track and track modules (link, link)
  • Add a condition to the telemetry track and track functions to skip sending data to segment if the platform property of the event is equal to the crowd analytics platform name (link, link)
  • Make the track function async to allow awaiting the crowd analytics function call (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@garrrikkotua garrrikkotua changed the title Feature/send analytics to crowd tenant Send analytics to crowd tenant Aug 2, 2023
@garrrikkotua garrrikkotua changed the title Send analytics to crowd tenant Send analytics to crowd team tenant Aug 2, 2023
@garrrikkotua garrrikkotua requested a review from epipav August 3, 2023 08:39
Copy link
Copy Markdown
Collaborator

@epipav epipav left a comment

Choose a reason for hiding this comment

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

lgtm 👍 Included one nitpick
Also, to render these activities properly in the UI, shouldn't we add these to activityTypes.ts ?

Comment thread backend/src/segment/addProductDataToCrowdTenant.ts
@garrrikkotua
Copy link
Copy Markdown
Contributor Author

With activityTypes I am not sure, because there's a lot of them and they are different. But actually they show up nicely in the UI so I keep it as it is for now

@garrrikkotua garrrikkotua merged commit 4f21a85 into main Aug 4, 2023
@garrrikkotua garrrikkotua deleted the feature/send-analytics-to-crowd-tenant branch August 4, 2023 12:06
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.

2 participants