Skip to content

Commit

Permalink
only include ab test data if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
solipet committed May 14, 2024
1 parent 9c3e020 commit 9b209cc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/services/idv/send_phone_confirmation_otp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,23 @@ def otp_sent_response
end

def extra_analytics_attributes
{
attributes = {
otp_delivery_preference: delivery_method,
country_code: parsed_phone.country,
area_code: parsed_phone.area_code,
phone_fingerprint: Pii::Fingerprinter.fingerprint(parsed_phone.e164),
rate_limit_exceeded: rate_limit_exceeded?,
telephony_response: @telephony_response,
ab_tests: {
}
if IdentityConfig.store.ab_testing_idv_ten_digit_otp_enabled
attributes[:ab_tests] = {
AbTests::IDV_TEN_DIGIT_OTP.experiment_name => {
bucket: bucket,
},
},
}
}
end

attributes
end

def parsed_phone
Expand Down

0 comments on commit 9b209cc

Please sign in to comment.