How to add JavaScript tracking code to magento websites?

The option to insert the tracking code to magento websites in the backwards website is available. Tracking or hacking both are different word and different meaning. If owner want to track their website pages for own benefit then tracking system is good way, but another person want to misuse the tracking functionality bad way then it is called hacking.

Magento has functionality to add JavaScript or php code on backend to track all website pages. If a hacker hacks the admin of Magento, then he can hack all the pages of the website by putting the hacking codes.

Currently we have face a problem that our website have hacking code which is open a new page and redirect a new web page when click any part of our website. We have surprise that we have not found any code in core file. The hacking code is added before the </head> tag and also added before the </body> tag. There are 2 place where hacking code are showing. Hacking links are:,

After waste lot of time for searching the error on core file, we go to login Magento admin panel and under “System->Configuration->Design->Head” section find miscellaneous scripts field. We have removed script code from here, after that we find another miscellaneous scripts field section under “System -> Configuration -> General -> Design Section -> Footer Tab -> Miscellaneous HTML”. We have delete all hacking script and save it.

How to add tracking code to magento websites

Below attached both miscellaneous script code path:

a) Head path

tracking code to Magento website

b) Body path

magento website error

The above assumptions show that magento tracking code can be easily inserted.

2 thoughts on “How to add JavaScript tracking code to magento websites?”

  1. Hello, i read your blog from time to time and i own a similar one
    and i was just wondering if you get a lot of spam responses?
    If so how do you prevent it, any plugin or anything you can advise?
    I get so much lately it’s driving me mad so any help is very much appreciated.


Leave a Comment