Skip to content

Commit 7271849

Browse files
subirjollySubir Jolly
andauthored
chore: add eventing on checkout success (#3326)
* chore: add eventing on checkout success * chore: use toString instead Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent 83fc39b commit 7271849

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/checkout/context/checkout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {PAYG_CREDIT_EXPERIMENT_ID} from 'src/shared/constants'
3232
import {CreditCardParams, RemoteDataState} from 'src/types'
3333
import {getErrorMessage} from 'src/utils/api'
3434
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
35+
import {event} from 'src/cloud/utils/reporting'
3536

3637
export type Props = {
3738
children: JSX.Element
@@ -310,6 +311,9 @@ export const CheckoutProvider: FC<Props> = React.memo(({children}) => {
310311
throw new Error(response.data.message)
311312
}
312313

314+
event('CheckoutSuccess', {
315+
creditApplied: isPaygCreditActive.toString(),
316+
})
313317
setCheckoutStatus(RemoteDataState.Done)
314318
} catch (error) {
315319
console.error(error)

0 commit comments

Comments
 (0)