Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from MozillaSocial/fix/login-signup-button-glean
Browse files Browse the repository at this point in the history
fix(analytics): click events for login and signup buttons [MS-45]
  • Loading branch information
jpezninjo authored Oct 25, 2023
2 parents 85e3d6a + 4ed7f6d commit 0c559df
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/nav/NavUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
gap-x-1 items-center justify-center text-sm p-x-10px p-y-10px xl:hidden text-center font-600
sm:mr-8px sm:btn-solid sm:btn-outline sm:b-rd-8px
:disabled="busy"
data-glean="header.signup"
@click="oauth('signup')"
>
{{ $t('action.create_account') }}
Expand All @@ -39,6 +40,7 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
gap-x-1 items-center justify-center text-sm font-600 p-x-11px p-y-11px xl:hidden
sm:border-1 sm:border-primary sm:btn-outline sm:b-rd-8px
:disabled="busy"
data-glean="header.login"
@click="oauth()"
>
{{ $t('action.sign_in') }}
Expand Down
2 changes: 2 additions & 0 deletions components/user/UserSignInEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
v-if="singleInstanceServer"
flex="~ row" gap-x-2 items-center justify-center btn-solid text-center rounded-3 font-500
:disabled="busy"
data-glean="nav.signup"
@click="oauth('signup')"
>
{{ $t('action.create_account') }}
Expand All @@ -22,6 +23,7 @@ const { busy, oauth, singleInstanceServer } = useSignIn()
v-if="singleInstanceServer"
flex="~ row" gap-x-2 items-center justify-center btn-outline text-center rounded-3 font-500
:disabled="busy"
data-glean="nav.login"
@click="oauth()"
>
{{ $t('action.sign_in') }}
Expand Down
12 changes: 12 additions & 0 deletions telemetry/engagementDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,17 @@ export const engagementDetails: EngagementDetails = {
'discover.recommendation.share': {
engagement_type: 'share',
},
'header.signup': {
engagement_type: 'general',
},
'header.login': {
engagement_type: 'general',
},
'nav.signup': {
engagement_type: 'general',
},
'nav.login': {
engagement_type: 'general',
},
...profileEvents,
}

0 comments on commit 0c559df

Please sign in to comment.