When working with Magento, you want to avoid core code changes whenever possible, as such changes will be overridden when you upgrade Magento.
In the case of controller behavior, you create files inside
/app/code/local instead of
For example, if you wish to change the functionality in the Google Analytics controller, copy this file:
And make your changes.