I want to add tracking code to last step checkout success.phtml

This file should be:


but here I have only folder:

  • coupon.phtml
    • form.phtml
    • minicart.phtml
    • shipping.phtml


I have found code in


and here I have added google tracking code.

What do you think about this? Will it work?


If you don't have this file in your theme, that's mean the file is coming from the core module,

check this path


you will find the success.phtml inside this folder, Copy this file to your path


Refresh the cache, then modify it as you wish

  • I have update my topic. – Sylvester Apr 21 '18 at 9:44
  • It is very important to do some test, Try to place order then try to use inspect element in the browser and search for your code to insure that the code is exist and the success.phtml taking from right place – WISAM HAKIM Apr 21 '18 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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