Module: Swiftype::Client::Analytics
- Included in:
- Swiftype::Client
- Defined in:
- lib/swiftype/client.rb
Overview
The analytics API provides a way to export analytics data similar to what is found in the Swiftype Dashboard. See the REST API Documentation for details.
Instance Method Summary collapse
-
#analytics_autoselects(engine_id, options = {}) ⇒ Object
Return the number of autoselects (when a user clicks a result from an autocomplete dropdown) that occurred on each day in the time range for the provided Engine and optional DocumentType.
-
#analytics_clicks(engine_id, options = {}) ⇒ Object
Return the number of clickthroughs (when a user clicks a result from a search results page) that occurred on each day in the time range for the provided Engine and optional DocumentType.
-
#analytics_searches(engine_id, options = {}) ⇒ Object
Return the number of searches that occurred on each day in the time range for the provided Engine and optional DocumentType.
-
#analytics_top_no_result_queries(engine_id, options = {}) ⇒ Object
Return top queries with no results for an engine.
-
#analytics_top_queries(engine_id, options = {}) ⇒ Object
Return top queries for an engine.
Instance Method Details
#analytics_autoselects(engine_id, options = {}) ⇒ Object
Return the number of autoselects (when a user clicks a result from an autocomplete dropdown) that occurred on each day in the time range for the provided Engine and optional DocumentType. The maximum time range between start and end dates is 30 days.
414 415 416 417 418 419 420 421 |
# File 'lib/swiftype/client.rb', line 414 def analytics_autoselects(engine_id, ={}) document_type_id = .delete(:document_type_id) if document_type_id get("engines/#{engine_id}/document_types/#{document_type_id}/analytics/autoselects.json", ) else get("engines/#{engine_id}/analytics/autoselects.json", ) end end |
#analytics_clicks(engine_id, options = {}) ⇒ Object
Return the number of clickthroughs (when a user clicks a result from a search results page) that occurred on each day in the time range for the provided Engine and optional DocumentType. The maximum time range between start and end dates is 30 days.
432 433 434 435 436 437 438 439 |
# File 'lib/swiftype/client.rb', line 432 def analytics_clicks(engine_id, ={}) document_type_id = .delete(:document_type_id) if document_type_id get("engines/#{engine_id}/document_types/#{document_type_id}/analytics/clicks.json", ) else get("engines/#{engine_id}/analytics/clicks.json", ) end end |
#analytics_searches(engine_id, options = {}) ⇒ Object
Return the number of searches that occurred on each day in the time range for the provided Engine and optional DocumentType. The maximum time range between start and end dates is 30 days.
396 397 398 399 400 401 402 403 |
# File 'lib/swiftype/client.rb', line 396 def analytics_searches(engine_id, ={}) document_type_id = .delete(:document_type_id) if document_type_id get("engines/#{engine_id}/document_types/#{document_type_id}/analytics/searches.json", ) else get("engines/#{engine_id}/analytics/searches.json", ) end end |
#analytics_top_no_result_queries(engine_id, options = {}) ⇒ Object
Return top queries with no results for an engine.
461 462 463 |
# File 'lib/swiftype/client.rb', line 461 def analytics_top_no_result_queries(engine_id, ={}) get("engines/#{engine_id}/analytics/top_no_result_queries.json", ) end |
#analytics_top_queries(engine_id, options = {}) ⇒ Object
Return top queries for an engine.
449 450 451 |
# File 'lib/swiftype/client.rb', line 449 def analytics_top_queries(engine_id, ={}) get("engines/#{engine_id}/analytics/top_queries.json", ) end |