I would like to load product view hit count for a specific product , i found that Magento database stores some counting in table e.g.
How can I load this value for showing in frontend? Do I need to set date range on it?
I try to use:
$collection = $objectManager->create('\Magento\Reports\Model\ResourceModel\Report\Product\Viewed\Collection')
to get the collection according to what it can be done on Magento 1.
which is extending:
where there is a method
setDateRange(), but when I call it, it shows error "unknown method". Anyone have any idea about this?