How to add Google Analytics code
Sign up for Google Analytics. Visit www.google.com/analytics/ to sign up or sign into Google Analytics with your Google username and password. Click on “Access Analytics” or click on “Create an account now” if you do not have a Google account.
- Add your website information. If you are signing up for the first time, you will be required to type in your website address, an account name for your website, your country, and your time zone in addition to your contact information.
- You will be asked to read and accept the user agreement for Google Analytics before you can finish creating an account for Google Analytics.
Access your tracking code. The tracking code is a string of HTML code you will have to copy and paste on every page of your website you wish to track statistics for.
- Locate the tracking code upon signing up for Google Analytics. After accepting the user agreement, you will be taken to a page that contains the HTML tracking code for your website.
- Locate the tracking code upon logging in to your account. If you are already signed up for Google Analytics, you will be taken to the Overview page that shows your website accounts. Select the account you want and from the Actions column and click on Edit. In the top right section of the Main Website Profile Information box, click on “Check Status.” You can find your tracking code underneath “Instructions for adding tracking.”
Add the tracking code to your website. Copy the tracking code and paste it into the HTML of your web page just before the closing head tag.
Verify your tracking code works properly. To make sure Google Analytics will begin tracking your website data, return to the Overview page that shows your website accounts. Select the account you want and from the Actions column, click on “Edit.” In the top right section of the Main Website Profile Information box, click on “Check Status.” In the Tracking Status Information box, you will be able to verify whether or not your tracking code was properly installed.
Allow 24 hours for Google Analytics to begin tracking your website data.
Decide what metrics you’re going to use, and how they’ll help you improve your website. Google Analytics has an overwhelming amount of information that it can provide to you about your website, and it’s difficult to know which information is useful and what to do with it. Get useful information by asking yourself the questions you want answers to about your visitors, what they do when they visit your site, and what could be improved on your website.