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

IS-2828: Add amplitude logging for sok #554

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

eirikdahlen
Copy link
Contributor

Hva har blitt lagt til✨🌈

Håper dette skal fikse:

  1. Antall klikk på søk-knappen
  2. Antall resultater

Og så har vi allerede målinger på klikk på person/lenke, som vi kan knytte opp til søk-klikket i en funnel.

@eirikdahlen eirikdahlen requested a review from a team as a code owner November 28, 2024 14:46
Comment on lines 65 to 69
useEffect(() => {
if (isSuccess) {
logSokPersonResults(searchResults.length);
}
}, [isSuccess, searchResults]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kunne man løst det uten en useEffect? Men er kanskje riktig, siden det er en sideeffekt.

Copy link
Contributor

Choose a reason for hiding this comment

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

mutate har vel en sånn onSuccess greie🤔 Går det an å logge det der? 😁 Se TildeltVeileder for eksempel

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ja true, det er jo kanskje bedre 👍🏼

Copy link
Contributor

@andersrognstad andersrognstad Nov 29, 2024

Choose a reason for hiding this comment

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

Ikke noe galt med useEffect her tror jeg, men synes å legge det i onSuccess-callbacken på mutate leser bedre 👍 Begge loggingene burde kanskje ligge i en sånn callback? Evt putte logSokPersonEvent i onSettled hvis vi vil logge den nå kallet har fullført uansett error/success.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Det var smart, funka bra 👍🏼

@@ -11,6 +11,7 @@ export enum EventType {
OptionSelected = 'alternativ valgt',
ButtonClick = 'knapp trykket',
SortingColumn = 'kolonne sortert på',
AmountDisplayed = 'antall vist',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tar gjerne tilbakemeldinger på navn her og data-objektet i typen. Sånn jeg forstår det skal dette helst være handlinger, men antall resultater er jo mer en handling av systemet og ikke brukeren 🤔

Copy link
Contributor

@vetlesolgaard vetlesolgaard Nov 28, 2024

Choose a reason for hiding this comment

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

Tenker det er gudd jeg 😊 Evt. 'antall resultater'. Men fint slik som det er også

@eirikdahlen eirikdahlen merged commit cb02319 into master Nov 29, 2024
3 checks passed
@eirikdahlen eirikdahlen deleted the IS-2828-amplitude-sok branch November 29, 2024 08:49
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.

4 participants