diff --git a/backend/api/src/gidx/complete-checkout-session.ts b/backend/api/src/gidx/complete-checkout-session.ts index df2a310d25..adb1ef1a5f 100644 --- a/backend/api/src/gidx/complete-checkout-session.ts +++ b/backend/api/src/gidx/complete-checkout-session.ts @@ -10,7 +10,7 @@ import { ProcessSessionCode, } from 'common/gidx/gidx' import { introductoryTimeWindow, User } from 'common/user' -import { getIp, track } from 'shared/analytics' +import { getIp, track, trackPublicEvent } from 'shared/analytics' import { getGIDXStandardParams, getLocalServerIP, @@ -276,4 +276,13 @@ const sendCoins = async ( ) } }) + + await trackPublicEvent(user.id, 'M$ purchase', { + amount: amount.mana, + priceInDollars: amount.priceInDollars, + bonusInDollars: amount.bonusInDollars, + transactionId, + sessionId, + source: 'gidx', + }) }