build this

This commit is contained in:
Seth Call 2026-01-22 22:36:58 -06:00
parent b6fc597f8b
commit bfbd266466
1 changed files with 7 additions and 8 deletions

View File

@ -350,15 +350,14 @@ module JamRuby
0.00
end
if monthly_cost > 0
ltv = monthly_cost * 12
begin
puts "Sending CAPI Subscribe event #{current_user.email}, #{monthly_cost}, #{ltv}"
CapiTransmitter.send_event('Subscribe', current_user, { value: monthly_cost.to_s, currency: 'USD', predicted_ltv: ltv.to_s })
rescue => e
puts "Error sending CAPI Subscribe event #{current_user.email}, #{e.message}"
end
ltv = monthly_cost * 12
begin
puts "Sending CAPI Subscribe event #{current_user.email}, #{monthly_cost}, #{ltv}"
CapiTransmitter.send_event('Subscribe', current_user, { value: monthly_cost.to_s, currency: 'USD', predicted_ltv: ltv.to_s })
rescue => e
puts "Error sending CAPI Subscribe event #{current_user.email}, #{e.message}"
end
rescue => e
puts "Error sending CAPI Subscribe event #{current_user.email}, #{e.message}"
end