How to Get the Website Code for Google Analytics?
Google Analytics is a free tool that you will help you monitor the amount and type of traffic coming to your website. In order for it to do that, you have to set up a website profile, and it will generate some code for you to put on every page of your site.
1. Log into Google Analytics at http://www.google.com/analytics
2. Click “Add Website Profile”
3. Then select “Add a Profile for new domain” and enter your domain name that you want to monitor …
4. After clicking the “Finish” button, you will be presented with some code that you are to copy and paste into your website (or to provide to your web developer to do so for you). Typically, get the code that is in the “Standard” tab.
5. The code is supposed to go right after the opening <body> tag of each page of the site. This is because Google Analytics now uses Universal Analytics tracking code which enables you to place the code higher in the page without blocking the loading of the rest of your page content.
If your website uses a templating system, you usually would only have to paste it into one place in the template and your templating system will output that code in every page of the site. For example in WordPress, it is usually in the header.php template file.
After pasting the code on the site, it may take some time before Google starts gathering data from it.
How to See the Website Code Again
If you had already created the website profile already and just need to see the website code again, find the website property, click the “Admin” menu, and click “Tracking Code”…
How to Track More Than One Site in Google Analytics
Your Google Analytics account can track more than one website. You do not need to create another account.
1. Just log into Google Analytics, scroll to the bottom and find the link “Add Website Profile”.
2. In the “Create New Website Profile” page, choose “Add a Profile for a new domain”.
3. Type in the domain name of your second site and click “Finish”
4. That should give you a new Google Analytics code for the second site.
5. Click “Save and Finish” button at the bottom.
Each website should have its own unique Google Analytics code often identified by its “Web Property ID”