From 7f2d990cb4e2ccc3ac6c1596c2580c86fedda113 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Mon, 19 Nov 2018 22:08:01 -0500 Subject: [PATCH] Update Account Reset Cancel analytics **Why**: The event property `event` was set to `visit`, which is wrong. This particular event corresponds to the user clicking a link in their email to cancel the account deletion request. This only validates the token, and if the token is valid, it displays a page where the user can click a button to process the cancellation. --- app/services/account_reset/validate_cancel_token.rb | 2 +- spec/controllers/account_reset/cancel_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/account_reset/validate_cancel_token.rb b/app/services/account_reset/validate_cancel_token.rb index 906cfdf9d23..66d79d0ed65 100644 --- a/app/services/account_reset/validate_cancel_token.rb +++ b/app/services/account_reset/validate_cancel_token.rb @@ -23,7 +23,7 @@ def user def extra_analytics_attributes { - event: 'visit', + event: 'cancel token validation', user_id: user.uuid, } end diff --git a/spec/controllers/account_reset/cancel_controller_spec.rb b/spec/controllers/account_reset/cancel_controller_spec.rb index 3b853b12e10..611761358a9 100644 --- a/spec/controllers/account_reset/cancel_controller_spec.rb +++ b/spec/controllers/account_reset/cancel_controller_spec.rb @@ -91,7 +91,7 @@ stub_analytics properties = { user_id: 'anonymous-uuid', - event: 'visit', + event: 'cancel token validation', success: false, errors: { token: [t('errors.account_reset.cancel_token_invalid')] }, }