Class: Algolia::UserInsights
- Inherits:
-
Object
- Object
- Algolia::UserInsights
- Defined in:
- lib/algolia/insights.rb
Instance Method Summary collapse
- #clicked_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
- #clicked_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
- #clicked_object_ids_after_search(event_name, index_name, object_ids, positions, query_id, request_options = {}) ⇒ Object
- #converted_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
- #converted_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
- #converted_object_ids_after_search(event_name, index_name, object_ids, query_id, request_options = {}) ⇒ Object
-
#initialize(insights, user_token) ⇒ UserInsights
constructor
A new instance of UserInsights.
- #viewed_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
- #viewed_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
Constructor Details
#initialize(insights, user_token) ⇒ UserInsights
Returns a new instance of UserInsights.
55 56 57 58 |
# File 'lib/algolia/insights.rb', line 55 def initialize(insights, user_token) @insights = insights @user_token = user_token end |
Instance Method Details
#clicked_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
72 73 74 |
# File 'lib/algolia/insights.rb', line 72 def clicked_filters(event_name, index_name, filters, = {}) clicked({ 'filters' => filters }, event_name, index_name, ) end |
#clicked_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
60 61 62 |
# File 'lib/algolia/insights.rb', line 60 def clicked_object_ids(event_name, index_name, object_ids, = {}) clicked({ 'objectIDs' => object_ids }, event_name, index_name, ) end |
#clicked_object_ids_after_search(event_name, index_name, object_ids, positions, query_id, request_options = {}) ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/algolia/insights.rb', line 64 def clicked_object_ids_after_search(event_name, index_name, object_ids, positions, query_id, = {}) clicked({ 'objectIDs' => object_ids, 'positions' => positions, 'queryID' => query_id, }, event_name, index_name, ) end |
#converted_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
87 88 89 |
# File 'lib/algolia/insights.rb', line 87 def converted_filters(event_name, index_name, filters, = {}) converted({ 'filters' => filters }, event_name, index_name, ) end |
#converted_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
76 77 78 |
# File 'lib/algolia/insights.rb', line 76 def converted_object_ids(event_name, index_name, object_ids, = {}) converted({ 'objectIDs' => object_ids }, event_name, index_name, ) end |
#converted_object_ids_after_search(event_name, index_name, object_ids, query_id, request_options = {}) ⇒ Object
80 81 82 83 84 85 |
# File 'lib/algolia/insights.rb', line 80 def converted_object_ids_after_search(event_name, index_name, object_ids, query_id, = {}) converted({ 'objectIDs' => object_ids, 'queryID' => query_id, }, event_name, index_name, ) end |
#viewed_filters(event_name, index_name, filters, request_options = {}) ⇒ Object
95 96 97 |
# File 'lib/algolia/insights.rb', line 95 def viewed_filters(event_name, index_name, filters, = {}) viewed({ 'filters' => filters }, event_name, index_name, ) end |
#viewed_object_ids(event_name, index_name, object_ids, request_options = {}) ⇒ Object
91 92 93 |
# File 'lib/algolia/insights.rb', line 91 def viewed_object_ids(event_name, index_name, object_ids, = {}) viewed({ 'objectIDs' => object_ids }, event_name, index_name, ) end |