问题
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.
- People who viewed this also viewed
- People who bought this also bought:
- Popular Today: top 5 products
- Recently viewed products by a customer:
- 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?
回答1:
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.
来源:https://stackoverflow.com/questions/29840990/how-to-implement-cross-selling-on-a-website