@@ -132,8 +132,12 @@ export const handleClaimCell = async (req: Request, res: Response) => {
132132 playerO . profileId > playerX . profileId
133133 ? `${ playerO . profileId } -${ playerX . profileId } `
134134 : `${ playerX . profileId } -${ playerO . profileId } ` ;
135- analytics . push ( { analyticName : "ties" , profileId : playerO . profileId , urlSlug, uniqueKey } ) ;
136- analytics . push ( { analyticName : "ties" , profileId : playerX . profileId , urlSlug, uniqueKey } ) ;
135+ analytics . push (
136+ { analyticName : "ties" , profileId : playerO . profileId , urlSlug, uniqueKey } ,
137+ { analyticName : "ties" , profileId : playerX . profileId , urlSlug, uniqueKey } ,
138+ { analyticName : "completions" , profileId : playerO . profileId , urlSlug, uniqueKey : playerO . profileId } ,
139+ { analyticName : "completions" , profileId : playerX . profileId , urlSlug, uniqueKey : playerX . profileId } ,
140+ ) ;
137141 } else if ( gameStatus . hasWinningCombo ) {
138142 const keyAssetPosition = keyAsset . position ;
139143
@@ -173,7 +177,11 @@ export const handleClaimCell = async (req: Request, res: Response) => {
173177 promises . push ( world . incrementDataObjectValue ( `keyAssets.${ keyAssetId } .gamesWonByUser.${ profileId } .count` , 1 ) ) ;
174178 promises . push (
175179 world . incrementDataObjectValue ( `keyAssets.${ keyAssetId } .totalGamesWonCount` , 1 , {
176- analytics : [ { analyticName : "completions" , profileId, urlSlug, uniqueKey : profileId } ] ,
180+ analytics : [
181+ { analyticName : "wins" , profileId, urlSlug, uniqueKey : profileId } ,
182+ { analyticName : "completions" , profileId : playerO . profileId , urlSlug, uniqueKey : playerO . profileId } ,
183+ { analyticName : "completions" , profileId : playerX . profileId , urlSlug, uniqueKey : playerX . profileId } ,
184+ ] ,
177185 } ) ,
178186 ) ;
179187
0 commit comments