We recently started using a Full Page Cache on our website which basically rendered our old method for tracking product views useless as soon as the page becomes cached. Our old method was basically a code snippet in design/frontend/theme/default/template/catalog/product/view.phtml which was executed on page load.

Now it is possible for me to hole punch this code so that it can run on each page load - I was wondering before doing that if there is a possible alternative method of recording views on the product page whilst using a FPC & without using hole punching?

  • Hard to say without knowing what FPC you are using and what the code snippet does, but the likelyhood is you will need to send a request into Magento which in turn means you are most likely going to need a hole punch. Dec 29, 2014 at 12:15

1 Answer 1


If you don't want to use hole punching you can load such data using AJAX request just after page is loaded.

Prepare controller action which returns that data for you. Then call this using JavaScript after page is loaded and update content with your new data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.