0

I have a website which is custom made. I haven't used any carts like Zencart etc. Again it is completely built custom.

I have to implemnt the following on the site.

  1. People who viewed this also viewed
  2. People who bought this also bought:
  3. Popular Today: top 5 products
  4. Recently viewed products by a customer:
  5. Cross selling emails etc.

I have looked into Analytics softwares like Piwik, Google Analytics, clicky. I know we can store this data as events in Piwik or GA.

The main question is how do I get this data and be able to formulate it and display products according to it on the site?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • Hi, your question is rather broad, you'll have to narrow it down a lot and perhaps reword your question a tad, otherwise you risk the question being closed :) – Epodax Apr 24 '15 at 07:21
  • This is to broad - any answer would need to cover at least data retrival via the GA API, building data models for recommendations and frontend developement to insert this into your site. I suggest you break this up into multiple questions, and even then the "model building" part probably does not fit very well into the stackoverflow QA format. – Eike Pierstorff Apr 24 '15 at 07:28
  • "People who viewed/bought this also viewed/bought" can be implemented as a background job that recalculates similarity patterns. You can use SQL in a relational database, but it is probably going to be slow, which is why you do it outside of your web app. For each product, scan through customers who viewed/bought it and at least one other product, and then group by product. For view/buy counts here greater than a cutout value, add them to a product X - product Y relation table. – halfer Apr 24 '15 at 08:08
  • thanks guys, I will divide this into sub questions: – Ritesh Ksheersagar Apr 24 '15 at 10:59
  • Yesterday a "related products" option appeared in my GA accounts. Documentation is here: https://developers.google.com/analytics/devguides/platform/related-products. Could not test it yet (apparently it requires 30 days of data before you get good results), but it seems relevant to your question. – Eike Pierstorff May 05 '15 at 10:37

1 Answers1

0

As for item 2) "People who bought this also bought", Google has released a related product feature that, in theory at least, should it make easy to implement this.

The feature needs to be enabled in the view settings and you need some days of e-commerce data. Then you execute e.g. the example query from the docs:

dimensions=ga:queryProductName,ga:relatedProductName,ga:queryProductId,ga:relatedProductId metrics=ga:correlationScore,ga:queryProductQuantity,ga:relatedProductQuantity sort=-ga:queryProductQuantity

Presumably a higher correlation score metric indicates which products have a stronger relationship.

The problem I have so far is that this is a blackbox - I do not know how Google computes the correlation score and so far the results look somewhat arbitrary (it might be that my dataset is not yet large enough). You can query the correlation model, but that will return "default" (not really helpful).

However if you are prepared to take a leap of faith and trust Google that this all will make sense then you can use the related product feature to implement cross selling in your website.

Query the data via the API and don't forget to cache the results, else you will eventually exceed your GA quota. After that it's just a matter of matching product ids on your product pages to the related product id with the highest correlation scores in the cached results.

Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62