class EventTracker
  def self.admin_panel_page_view(user_info, url)
    SpadeClient.send_event({
      event: 'admin_panel_page_view',
      url: url,
  }.merge(user_info))
  end

  def self.admin_panel_page_view_heartbeat(user_info, url, duration, is_active_tab)
    SpadeClient.send_event({
      event: 'admin_panel_page_view_heartbeat',
      url: url,
      total_time_seconds: duration,
      tab_is_focused: is_active_tab,
  }.merge(user_info))
  end
end
