It's very easy to add the Google Analytics tracking code to your DotNetNuke site: Just go to Admin - Google Anaytics, enter your tracking ID and the tracking code is automatically generated for every page.
But what if you need to REMOVE the Google Analytics code? DNN doesn't let you replace your tracking ID with nothing in the Google Analytics page (the field is mandatory). So, you either stick with it or put an invalid value (such as "0") and have your site generate a totally invalid and useless tracking code all the time.
What you can do, is go to your site's root folder and find the siteanalytics.config file. That's where the tracking code is. (As of DNN version 6.2.4, this doesn't seem to have changed).
The problem is that if you delete this file it keeps getting regenerated. So the only way to avoid generating analytics is to keep the file but COMMENT OUT or DELETE everything inside the CDATA tag (essentially,the script tag from start to finish). This way, DNN will still see the file is there, but won't generate anything for Google to use.
If, at a later time, you need to restore your Google Analytics tracking code, you can either delete the file (so that it can be auto-generated again) or just uncomment what you commented.
Hope it helps!