Algolia insights tracking

  • mcl7
    3 years, 2 months ago #23188

    It would be ideal to have an additional add-on for Algolia insights that included the click tracking, user token for user tracking, and conversion tracking.

    3 years, 2 months ago #23192

    It looks nice indeed, at least on paper.

    But I wonder if it is really a good idea to introduce user behaviour in the algorithm. It is named “Learn to rank”, but I do not know an example of successful implementations.

    The 2 points for me are:
    – In general, you need a lot of data (user events) to get relevant results, which most sites do not have
    – You can introduce user bias in your system

    3 years, 2 months ago #23203

    Very true on needing lots of data but that’s only for certain types of personalization and personalization is only one of the goals here.

    Without manipulating the results at all you can take advantage of the recommendations API in order to send personalized emails or provide personalized on-site recommendations.

    In these two cases, it is much less important to have millions of users (for example) since the data presented to the user is personalized to that user and is independent of what other users do.

    However, the user token and at least the click events have to be in place in order to set a personalization strategy.

    A much more simple reason why to implement Algolia insights is to use the reporting which includes clickthrough rate, conversion rate, and click rate at the query level. This independent of any personalization at all but still very important.

    3 years, 2 months ago #23208

    Can you tell me how you imagine the whole setup would happen?

    2 years, 8 months ago #27008

    Been a while since I posted this but not because it’s not important. It actually became more important because it’s required in order to utilize the Recommendations API that Algolia just launched.

    What is needed here is pretty straight forward and it could work a couple of ways (to answer your question).

    There are a few ways to implement this outlined in the Algolia documentation: Google Tag Manager,, or just your own code.

    I’m going to be using Google Tag Manager but I believe what we need from WPsolr is independent of which option someones decides on (?). I suppose you could do different configurations for each option within a single addon? I will leave implementation for later though and just stick to the bare essentials for this to work for everyone.

    What is required to make this work are three things made available by WPSolr (in the HTML source of pages powered by WPSolr) so that they can be passed to Algolia Insights along with clicks, conversion:

    1. ObjectID – This is just the productID (1234-0). Note that there is a -0 after the productID in the source generated by WPSolr. I believe this is related to the index but I will confirm after my call with Algolia. Ideally, though, the -0 is appended to the product ID to keep it clean (not require us to add it).

    2. Position – No action is required here as it’s just a calculation that we need to do on our end that tells Algolia where the product was in the results.

    3. QueryID – This is just the Algolia queryID that needs to be made available in the HTML source as well so that it can be passed back to Algolia along with clicks and conversions.

    So, from here. The only thing we REALLY need is the Algolia queryID to be displayed in the HTML somewhere.

    However, the following is also required and I wanted to cover it even though it may be out of the scope of what is needed from WPSolr.

    4. UserToken – Here Algolia is asking for us to pass – and store on our end – a unique hash for each user that can be passed to Algolia. I am planning on using ACF for a custom field to store a hash for each user that we can also pass to Algolia. I don’t think we need anything from WPsolr for this but thoughts here are most welcome!

    So, lots of words here but I think all we really need from WPsolr to implement Algplia Insights is the queryID to be somewhere in the HTML.

    Is this something you can provide (or maybe is already there and I am missing it) in WPsolr?

    2 years, 8 months ago #27009

    The UserToken is the real hard point I think. How to generate it, depending on your scenario and the visitor’s journey (if the user is a not yet engaged visitor, a WooCommerce customer, a bbPress logged-in forum contributor, …).

    The other issue is what to do with the personnalisation, appart from showing it in Algolia’s insight dashboards. How this information can be used to trigger real-time actions?

    2 years, 8 months ago #27010

    Thank you for the feedback!

    UserToken: we are going to simplify this by only issuing hashes for users that have logged in. In the future, we may look to solving the problem you are talking about but right now its not a big concern.

    Personalization: anything that the user searches for, clicks on, or purchases are the starting point which is what Algolia Insights provides. Before we even get to talking about the Recommendations API implementing Algolia Insights is required to fully take advantage of the Analytics they provide from within their system.

    Considering the Recommendations API – there are a lot of things we can do but yes there is the actual personalization of any recommendations that are being presented but we also have the ability to present personalized results in other channels, specifically email.

    Lastly, I would say that the other benefit for us is to simply have all of the recommendations, categories, and search all powered by a single search provider.

    Is it possible to add the queryID to the source?

    2 years, 8 months ago #27011

    Indeed, Algolia Insights is a requirement, and prior to that an event tracking system tightly integrated to WPSOLR.

    1) First build a new Google Tag manager tracking add-on for WPSOLR, perhaps connected to an existing GTM plugin.
    2) Then connect the new tracking add-on to Algolia’s insight.

    I foresee issues already, as WordPress login cookie is “Http Only” nowadays, which could prevent the use of a GTM 1st cookie party variable to extract WP UserId and send it to where it’s needed.

    But I’ll see that during the development.

    2 years, 8 months ago #27012

    Can you create another topic for Algolia recommendations? You view on a single plugin doing it all (search, personnalisation, recommendation) is very interesting.

    2 years, 8 months ago #27054

    Sorry, but this new development will be postponed for a while.

    The current integration with the Weaviate AI semantic search is WPSOLR’s priority.

    2 years, 8 months ago #27055

    Ok cool, understood.
    Until then, the only thing that I technically need to make this happen is the actual Algolia queryID to be provided in the HTML source somewhere.

    If you can do that I can go through the whole process and document it for you and propose a way for you to integrate it with your plugin. I will be able to be very specific after I go through the entire process.


    1 year, 6 months ago #30633

    For information, Algolia’s user event tracking has started and is planned to be release with WPSOLR 22.4

    1 month, 4 weeks ago #38287

    WPSOLR Enterprise has released Algolia’s user event tracking, with Algolia personalized search, Algolia Recommend, but also Algolia NeuralSearch™ (AI search). See the full grid of features.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.