Class: V0::SearchClickTrackingController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- V0::SearchClickTrackingController
- Includes:
- ActionView::Helpers::SanitizeHelper
- Defined in:
- app/controllers/v0/search_click_tracking_controller.rb
Constant Summary
Constants inherited from ApplicationController
ApplicationController::VERSION_STATUS
Constants included from SignIn::Authentication
SignIn::Authentication::BEARER_PATTERN
Constants included from ExceptionHandling
ExceptionHandling::SKIP_SENTRY_EXCEPTION_TYPES
Instance Method Summary collapse
-
#create ⇒ Object
Sends click tracking data to search.gov analytics, based on the passed url, query, position, client_ip, and user_agent.
Methods inherited from ApplicationController
#clear_saved_form, #cors_preflight, #routing_error
Methods included from Traceable
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Methods included from SignIn::Authentication
#authenticate, #authenticate_service_account, #load_user
Methods included from Headers
#block_unknown_hosts, #set_app_info_headers
Methods included from AuthenticationAndSSOConcerns
#authenticate, #clear_session, #extend_session!, #load_user, #log_sso_info, #render_unauthorized, #reset_session, #set_api_cookie!, #set_session_expiration_header, #sso_logging_info, #validate_inbound_login_params, #validate_session
Instance Method Details
#create ⇒ Object
Sends click tracking data to search.gov analytics, based on the passed url, query, position, client_ip, and user_agent.
16 17 18 19 20 21 22 23 |
# File 'app/controllers/v0/search_click_tracking_controller.rb', line 16 def create response = SearchClickTracking::Service.new(url, query, position, user_agent, module_code).track_click if response.success? render nothing: true, status: :no_content else render json: response.body, status: :bad_request end end |