How to Add Google Analytics Tracking Code to Your Website

Here are the steps to add Google Analytics Tracking Code to your website.

How to Install & Setup Google Analytics for Your Website

1. Sign up with a Google Account: You need a Google account to sign up for Google Analytics. If you don’t have one, you can create a google account. If you already have a google account that you use to access other services such as GMail, YouTube, or Google Drive, you can visit Google Analytics to sign up or sign in with your Google username & password.

how do i sign up for google analytics

2. Add website information: After you click the ‘Sign up’ button, you’ll need to provide basic information about your website such as website name & URL. If you’re setting up Google Analytics for the first time, you’ll also need to provide an Account name for your website, and additional information such as Reporting timezone and country, and data sharing settings.

how to setup google analytics for website

3. Get Tracking code: Once you’re done, click ‘Get Tracking ID’. You’ll see a popup of Google Analytics Terms & Conditions, which you have to agree to.

google analytics data sharing settings

4. Add Tracking Code to your website: After you accept the User Agreement, you’ll be taken to a page where you’ll get the Google Analytics Tracking Code for your website. It’s an HTML code that you can copy-paste on all pages of your website for pages which you want to track statistics for.

where to put google analytics tracking code for website

5. Where to add Google Analytics Tracking Code for your website ? You can paste the tracking code either before the HTML body, in your HEAD tag, or after the body

6. View Google Analytics Dashboard: Kindly allow 24-48 hours for Google Analytics to track and analyze your website data. Now when you log in to check your Google Analytics, you’ll be taken to a page titled Audience Overview where you can track daily traffic on your website, and other key traffic metrics for your site.


You can do a lot of cool stuff with Google Analytics such as track sign ups, sales, clicks by setting up Google Analytics Goals for your website. You can also track custom events by setting up event tracking in Google Analytics or adding custom dimensions for Google Analytics.


Pro Tips:

  1. When you set up Google Analytics for your website, use your own Google Account. Don’t allow anyone (web developer, SEO, web designer, web host, etc) to use their Google Account to install Google Analytics for your website. Otherwise, if you part ways, they’ll go away with all your Google Analytics data and you’ll have start from scratch.
  2. How to know if your Google Analytics is working ? After you log into Google Analytics, click on Admin button at the bottom left corner of your screen. This will take you to the Admin page. Click Tracking Code under Tracking Info Menu.

how to know if google analytics is working

You’ll be taken to a page which will display the Status as Receiving traffic for past 48 hours

how to add website to google analytics

Also, check out our list of Best Web Analytics Tools to understand visitor behavior and grow your business. You can also learn how to get Google Analytics Individual Qualification certificate to leverage google analytics for your organization.


You can also check out our list of Best Google Analytics Alternatives that you can use to grow your business