Skip to content

Commit

Permalink
IS-3017: log helptext click
Browse files Browse the repository at this point in the history
  • Loading branch information
ingring committed Jan 29, 2025
1 parent 37b8a4c commit c215240
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/sider/sokperson/SokPerson.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ const texts = {
error: 'Noe gikk galt under søket. Vennligst prøv igjen.',
};

function logHelpTextClick() {
Amplitude.logEvent({
type: Amplitude.EventType.ButtonClick,
data: {
url: window.location.href,
tekst: texts.helpText.info.title,
},
});
}

function logSokPersonEvent() {
Amplitude.logEvent({
type: Amplitude.EventType.ButtonClick,
Expand Down Expand Up @@ -168,7 +178,10 @@ export default function SokPerson() {
<Heading level="2" size="medium">
{texts.header}
</Heading>
<HelpText title={texts.helpText.info.title}>
<HelpText
title={texts.helpText.info.title}
onClick={() => logHelpTextClick()}
>
<Label>{texts.helpText.info.title}</Label>
<BodyLong>{texts.helpText.info.p1}</BodyLong>
<BodyLong className="pt-2">{texts.helpText.info.p2}</BodyLong>
Expand Down

0 comments on commit c215240

Please sign in to comment.