Google Optimiser gives a piece of code to insert at the beginning and end of the original ez-page and another piece of code at the end of the 2nd alternative ez-page. This can be easily copy and pasted using the ZenCart admin.
Now for the tricky part.
Having selected the add to shopping cart stage as the ‘measurement of success’ page i placed the tracking code in /includes/templates/YOURTEMPLATE/template/tpl_shopping_cart_default.php. This file will need to be copied from the template default and uploaded to the server in YOUR TEMPLATE folder.
This file has 2 functions: display the cart when an item is added and display the cart when it is empty. So, to measure page success when something is added to the cart, the Google code needs to go in the middle of the file before the ‘cart is empty’ function.
I inserted the code around line 174 in tpl_shopping_cart_default.php just after the shipping estimator section as shown below.
Once edited upload the file to your server and save an additional temporary copy to your desktop.
Validating the file.
Google will not be able to validate the performance success page so this needs to be done manually with the saved copy of tpl_shopping_cart_default.php as illustrated below.
Verify all the information in the optimiser and let your experiment begin.
It may need some tweaking but now the pages are in place I can edit the ez-page easily through ZenCart admin section as long as I don’t disturb the Google script allowing experimentation with the page content.

