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: plausible tracking stickiness #3363

Merged
merged 8 commits into from
Mar 22, 2023

Conversation

andreas-unleash
Copy link
Contributor

Adds plausible tracking when default project stickiness is changed

About the changes

Closes #

Important files

Discussion points

# Conflicts:
#	package.json
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
@vercel
Copy link

vercel bot commented Mar 21, 2023

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

Name Status Preview Comments Updated
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 22, 2023 at 5:57PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Mar 22, 2023 at 5:57PM (UTC)

Copy link
Contributor

@kwasniew kwasniew left a comment

Choose a reason for hiding this comment

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

Originally when I was thinking how I'd implement it I thought about useEffect tracking an attempt to change the select box to something other than default. But now that I see how you added this inside the submit handler also makes sense.

@@ -10,6 +12,7 @@ import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import useToast from 'hooks/useToast';
import { formatUnknownError } from 'utils/formatUnknownError';
import { GO_BACK } from 'constants/navigate';
import { usePlausibleTracker } from '../../../../hooks/usePlausibleTracker';
Copy link
Contributor

Choose a reason for hiding this comment

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

dots

import useProjectForm from '../hooks/useProjectForm';
import useProjectForm, {
DEFAULT_PROJECT_STICKINESS,
} from '../hooks/useProjectForm';
Copy link
Contributor

Choose a reason for hiding this comment

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

dots

@@ -15,6 +17,7 @@ import AccessContext from 'contexts/AccessContext';
import { Alert } from '@mui/material';
import { GO_BACK } from 'constants/navigate';
import { useDefaultProjectSettings } from 'hooks/useDefaultProjectSettings';
import { usePlausibleTracker } from '../../../../hooks/usePlausibleTracker';
Copy link
Contributor

Choose a reason for hiding this comment

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

dots

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
@andreas-unleash
Copy link
Contributor Author

Initially I was planning to use it within a useEffect, but that would give false results if someone is changing the select over and over. Having it in the submit handler, ensures we only track what we need

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
# Conflicts:
#	frontend/src/hooks/api/actions/useProjectApi/useProjectApi.ts
#	frontend/src/hooks/usePlausibleTracker.ts
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants