Show quantity of item sold on website

I've had a thought. Is there a way to retrieve the number of a particular item sold through FoxyCart in the last 24hrs and display that number to my customers on the product page.

Similar to what eBay do, when they display the amount of people who've viewed the item in the last 24hrs.

I thought it might spur people into making a purchase, kind of like a social proof thing.

On a similar note, do you guys know how to embed the number of page-views via Google Analytics in a similar fashion?

image
Comments
  • fc_adamfc_adam FoxyCart Team
    @Pecan,

    You can set up something like that using our API - you'd perform a request to calculate the number of transactions filtered to a specific product. You'd probably want to cache this number on your side so the request doesn't happen on every page load to minimise the number of requests needed and improve performance. You could also handle it completely on your side using the datafeed to get a notification of the details of each transaction and save the products purchased to a database. You can then query that database to calculate the number sold in the last 24 hours.

    In terms of getting page view stats from Google Analytics, that's not something I'm familiar with sorry.
Sign In or Register to comment.