"Add to Basket" not working when customer enters site via Google PLA ads

We've been troubleshooting a problem with "Add to Basket" not working for some time. On occasions the "Add to Basket" doesn't work and simply redirects the customer to an empty basket. No matter how many times they click, they cannot add the product to basket.

We have pinpointed this to customers entering the site on Google PLA advertising clicks (via google shopping). In these cases we can see in the log file that there are 'form key errors' for 'add to cart' actions which are attempted by customers coming in via PLA clicks.

We disabled the LiteMage Cache extension a week ago and we haven't seen this problem at all since then. Therefore this is related to LiteMage Cache.

Can you please advise how we can get assistance to resolve this?



Well-Known Member
Staff member
It may be related to your Magento extension, some example like: https://www.litespeedtech.com/suppo...e:litemage:troubleshooting:cart-appears-empty

You can engage us through paid LiteMage support for troubleshooting. LiteMage Premium support is fully refundable if we fail to enable LiteMage cache for your site.

Or you can engage experienced Magento developer for such investigation, they can take reference:


Well-Known Member
Staff member
Basically, since Magento is complicated, the Magento extension you are using could be complicated as well. The links are rather the showcases of how much time our developer is going to spend and some steps to be taken, but it may not be the direct solution for your current Magento extension. most likely some code change needs to be done to your Magento extension to avoid some conflicting. You can engage us through LiteMage premium support for further investigation.


Staff member
Hello, linkbright.
I realize you said you have switched, but in the case you decide to troubleshoot some more on your own at some point, I wanted to share this wiki link. Any chance you are using Cloudflare with the page cache enabled? It would cause that type of behavior with form_key.
Hi, we're not using Cloudflare. We've now installed a different cache extension with great results.... and no 'add to cart' issues, so we won't be troubleshooting anymore. Thanks anyway :)