@@ -1233,6 +1233,10 @@ export const changeCollaboratorAuthorization: AsyncAction<{
12331233 authorization : Authorization ;
12341234 sandboxId : string ;
12351235} > = async ( { state, effects } , { username, authorization, sandboxId } ) => {
1236+ effects . analytics . track ( 'Update Collaborator Authorization' , {
1237+ authorization,
1238+ } ) ;
1239+
12361240 const existingCollaborator = state . editor . collaborators . find (
12371241 c => c . user . username === username
12381242 ) ;
@@ -1262,6 +1266,7 @@ export const addCollaborator: AsyncAction<{
12621266 sandboxId : string ;
12631267 authorization : Authorization ;
12641268} > = async ( { state, effects } , { username, sandboxId, authorization } ) => {
1269+ effects . analytics . track ( 'Add Collaborator' , { authorization } ) ;
12651270 const newCollaborator : CollaboratorFragment = {
12661271 lastSeenAt : null ,
12671272 id : 'OPTIMISTIC_ID' ,
@@ -1297,6 +1302,7 @@ export const removeCollaborator: AsyncAction<{
12971302 username : string ;
12981303 sandboxId : string ;
12991304} > = async ( { state, effects } , { username, sandboxId } ) => {
1305+ effects . analytics . track ( 'Remove Collaborator' ) ;
13001306 const existingCollaborator = state . editor . collaborators . find (
13011307 c => c . user . username === username
13021308 ) ;
@@ -1325,6 +1331,8 @@ export const inviteCollaborator: AsyncAction<{
13251331 sandboxId : string ;
13261332 authorization : Authorization ;
13271333} > = async ( { state, effects } , { email, sandboxId, authorization } ) => {
1334+ effects . analytics . track ( 'Invite Collaborator (Email)' , { authorization } ) ;
1335+
13281336 const newInvitation : InvitationFragment = {
13291337 id : 'OPTIMISTIC_ID' ,
13301338 authorization,
@@ -1368,6 +1376,8 @@ export const revokeSandboxInvitation: AsyncAction<{
13681376 invitationId : string ;
13691377 sandboxId : string ;
13701378} > = async ( { state, effects } , { invitationId, sandboxId } ) => {
1379+ effects . analytics . track ( 'Cancel Invite Collaborator (Email)' ) ;
1380+
13711381 const existingInvitation = state . editor . invitations . find (
13721382 c => c . id === invitationId
13731383 ) ;
0 commit comments