Antecons developer diary part 2

This post is about Antecons, a product recommendation engine, now part of Conversio. Antecons is no longer commercially available, but I have kept my developer diary on my website with permission.


In part 1 of the Antecons developer diary, I wrote about what stalled the development of Antecons a year ago. It was a combination of a lack of time and a lack of vision. In this post, I will elaborate on the problems I ran into and how I intend to tackle them (or not) this time.

The ideal scenario

To reiterate from my last post, the ideal scenario for getting Antecons to work with a webshop looks like this:

  1. User registers for Antecons and receives a unique User ID.
  2. User inserts 10 lines of Javascript code in the header of each webshop page where Antecons should show recommendations.
  3. Antecons takes care of the rest and starts showing recommendations on the user’s webhsop.

There are two major problems with this approach: How do we get the data foundation and how do we automatically show the recommendations.

The data foundation

The recommendations of Antecons are supposed to be based partly on previous purchases in a webshop. But how can Antecons gather sales data for the data foundation. I can think of a few solutions:

  • Send sales data to Antecons in batches.
  • Send sales data to Antecons the moment a purchase is made.
  • Have Antecons fetch sales data from a tracker that is already set up, such as Google Analytics.

All of the above require some action from the user and thus deviate from the ideal scenario. The first two require implementation on the webshop before using Antecons. The third also requires implementation on the webshop but in an earlier step, i.e. when setting up Google Analytics.

Besides sales data, the data foundation would probably also consist of data about each product, such as product name, description, image and product page url in order for Antecons to automatically show recommendations. Some of the options from above also apply here. We could:

  • Send product data to Antecons in batches.
  • Send product data to Antecons the moment a product is created/changed.
  • Create a web crawler that extracts product data from the webshop.

The first two options are basically the same as listed earlier. The third option, however, has some potential, especially if the product pages are nicely marked up with appropriate tags, classes or similar that could tell a crawler something about the data. For example, a crawler could be set up to look for the following elements:

<img class="product-image" src="images/a-fine-image.jpg" />
<span class="product-name">Nice product</span>
<div class="product-description">It has good features.</div>
<span class="product-price-single">42</span>

If the crawler regularly searched through the webshop, the user would not have to update their product catalogue themselves.

The presentation

Let us assume that we have the data foundation. Now, we need to show recommendations on the user’s webshop. But how can Antecons know where to show recommendations on e.g. a product page if the recommendations are shown completely automatic from a piece of Javascript code. It seems it would require at least some user action. To make it simple for the user, maybe the user can just create sections of a page where Antecons is allowed to show recommendations. These sections could be marked like this:

<div class="antecons-recommendations"></div>

Antecons could then insert recommendations in these sections. There is a problem though. What about products that change pictures, prices, urls and so on? How can these changes be reflected automatically by Antecons with immediate effect: Well, they cannot, unless the Antecons data is updated at the same time as the user data is updated. Perhaps a web crawler could help in this regard, as mentioned in the previous section but it might not be the best way to do it.

The “solution”

In software development, there is rarely a perfect solution to a problem. So I have decided to step back and say: The user probably has to do some initial work to get Antecons up and running and that is ok. Instead of focusing so much on the initial setup, I will try to make an API that is easy to use, fast and provides good data analysis possibilities. First, it makes sense to construct a minimal viable API for Antecons. This API would provide the following:

  • A way to send transactional data to Antecons (e.g. sales data).
  • A way to fetch recommendations for a single item.

And that is basically it and what I am currently working on. After that, we can iterate. I have not shelved the idea of having a crawler and I have not shelved the idea of having some simple Javascript code to do a lot of the work for the user. But it might be that a better option is to write some plugins for popular e-commerce systems such as Magento, Shopify and others. As I just said: We can iterate. This is just the beginning.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.