diff --git a/app/controllers/api/submitter_email_clicks_controller.rb b/app/controllers/api/submitter_email_clicks_controller.rb index 7d6461f8b..87221680f 100644 --- a/app/controllers/api/submitter_email_clicks_controller.rb +++ b/app/controllers/api/submitter_email_clicks_controller.rb @@ -8,8 +8,7 @@ class SubmitterEmailClicksController < ApiBaseController def create submitter = Submitter.find_by!(slug: params[:submitter_slug]) - if params[:t] == SubmissionEvents.build_tracking_param(submitter, 'click_email') || - params[:t] == SubmissionEvents.build_tracking_param_legacy(submitter, 'click_email') + if params[:t] == SubmissionEvents.build_tracking_param(submitter, 'click_email') SubmissionEvents.create_with_tracking_data(submitter, 'click_email', request) end diff --git a/lib/submission_events.rb b/lib/submission_events.rb index 41addfbf0..1be9f953e 100644 --- a/lib/submission_events.rb +++ b/lib/submission_events.rb @@ -20,12 +20,6 @@ module SubmissionEvents module_function - def build_tracking_param_legacy(submitter, event_type = 'click_email') - Base64.urlsafe_encode64( - [submitter.slug, event_type].join(':') - ).first(TRACKING_PARAM_LENGTH) - end - def build_tracking_param(submitter, event_type = 'click_email') Base64.urlsafe_encode64( Digest::SHA1.digest([submitter.slug, event_type, Rails.application.secret_key_base].join(':'))