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

feat(experiment): Setup Amplitude experiment & Add first dev collab experiment #1273

Merged
merged 10 commits into from
Jan 25, 2024

Conversation

xrutayisire
Copy link
Collaborator

Context

The Solution

  • Setup Amplitude Experiment with @amplitude/experiment-js-client
  • Add two new function to telemetry manager
    • initExperiment
    • experimentVariant
  • Do not allow experiment if telemetry is deactivated
  • Create a new hook to query any experiment in the future
  • Create a new component for the dev collab experiment
  • Display it only if experiment is on
  • Use data from the variant payload

Impact / Dependencies

  • None

Preview

Screenshot 2024-01-24 at 12 58 12 Screenshot 2024-01-24 at 12 58 20

Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
slice-machine ✅ Ready (Inspect) Visit Preview Jan 25, 2024 11:09am

},
})
.catch((error) => {
console.error("Error starting experiment", error);
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you log this error and not the one below in prod?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good one! I think I just don't need a catch, better to just use the try catch for both, thanks

Copy link
Contributor

@hypervillain hypervillain left a comment

Choose a reason for hiding this comment

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

Is there any way for us to know that an Experiment is over and that we can safely remove DevCollaborationExperiment?

@xrutayisire
Copy link
Collaborator Author

xrutayisire commented Jan 24, 2024

Is there any way for us to know that an Experiment is over and that we can safely remove DevCollaborationExperiment?

@hypervillain Yes, Mabel or Côme tell us it's over 😬
We can also check it ourselves in Amplitude Experiment, but it's always best to ask before the removal.

For me, it should also be, as soon as they archive an experiment, they tell us and create a ticket to remove the dead code.

@xrutayisire xrutayisire merged commit 4791e05 into main Jan 25, 2024
34 checks passed
@xrutayisire xrutayisire deleted the xru/amplitude-experiment branch January 25, 2024 11:42
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