You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: phone_errors_controller.rb
    path of file: ./repos/identity-idp/app/controllers/idv
    
    the code of the file until where you have to start completion: module Idv
  class PhoneErrorsController < ApplicationController
    include Idv::AvailabilityConcern
    include IdvSte
    
    def track_event(type:)
      attributes = { type: type }.merge(ab_test_analytics_buckets)
      if type == :failure
        attributes[:limiter_expires_at] = @expires_at
      else
        attributes[:remaining_submit_attempts] = @remaining_submit_attempts
      end