Ask A Question

Notifications

You’re not receiving notifications from this thread.

Searchkick conversion settings help

Alex Deering asked in Gems / Libraries

Im starting to integrate search features into my recipe app and looking to build a "Popular", "Trending", and "Just For You" query to display on the index screen. Ive got the searchkick and searchjoy gems install and basic search with filtering constraints setup via tags and aggs. Reading thru the searchkick documentation it looks like the feature I want to use for the popular and trending is conversions. Having a little trouble understanding the flow of logging conversions to the database and the elasticsearch indexing though.

My understanding so far is with the searchjoy gem, have a separate table that logs searches by users, time, etc. Then I need to pass the id of the search to the results view, and if I want to track some action like viewing a recipe need to update the search record with that recipe id. Is that right?

That all seems pretty straightforward, but I have a few questions to make sure Im setting this up right:

  1. If I want to track a conversion that requires them to view a recipe first, like saving a recipe to their favorites, I should pass the search id to the show view as well and then trigger conversion with the save action?
  2. If i wanted to make a few types of conversions would I do something like this: searchkick conversions: [:view_conversions, :save_conversions, :made_conversions] And for tracking those in the searches table I guess I would need to create a new column with the conversion type, since all of those would be recipe conversions which searchjoy just has the record type and id...does this seem right?
Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.