Module: Swiftype::Client::Clickthrough

Included in:
Swiftype::Client
Defined in:
lib/swiftype/client.rb

Overview

A Clickthrough represents a user clicking on a full-text search result.

If you are routing searches through your own server instead of executing them client-side with the Swiftype JavaScript API, you will need to record clickthroughs yourself.

Instance Method Summary collapse

Instance Method Details

#log_clickthrough(engine_id, document_type, q, id) ⇒ Object

Log a clickthrough for a Document.


503
504
505
506
507
508
# File 'lib/swiftype/client.rb', line 503

def log_clickthrough(engine_id, document_type, q, id)
  post(
    "engines/#{engine_id}/document_types/#{document_type}/analytics/log_clickthrough.json",
    {:q => q, :id => id}
  )
end