I need to add Tracking code to Magento.

  1. Put in the < BODY> section on all store pages the code:

enter image description here

  1. On Order sucesfull page / Confirmation page to submit the transaction in the < BODY> section put the script:

enter image description here

Anyone help in which files should I put these codes to work properly?

1 Answer 1


app/code/Magento/Checkout/view/frontend/templates/success.phtml app/code/Magento/Theme/view/frontend/templates/html/container.phtml

Don't forget to override it in your custom theme

P.S. It can also be placed in vendor/magento folder instead of app/code/Magento. It depends on how did you install Magento

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.