Google Analytics shows you how many people visit your website, what pages they look at, and where they come from

Google Analytics is a free tool that tracks visitor activity on your website. Once you install it, you can see how many people visited each day, which pages they spent time on, whether they came from a search engine or a link, and what device they used. You do not pay anything — Google offers it free because the data helps them understand how the web works.

The setup takes about 15 minutes if you own your website's code or have access to edit the HTML. If you use a website builder like Wix, Squarespace, or WordPress.com, the process is faster because those platforms have built-in Google Analytics connections. If someone else built your website and you do not have editing access, you will need to ask them to add the tracking code for you.

Key Takeaways

  • Google Analytics is free and shows you visitor counts, which pages people read, and where visitors come from.
  • You need a Google account to set up Analytics, and you must own or have editing access to your website.
  • The setup involves creating a property in Google Analytics and adding a tracking code to your website's HTML or connecting through your website builder.
  • Data starts appearing in your Analytics dashboard within 24 to 48 hours after the tracking code is live.
  • Google Analytics collects information about visitors, so you may need to mention this in a privacy policy if you have one.

Create a Google account and set up your Analytics property

Go to analytics.google.com and sign in with a Google account. If you do not have one, create one at accounts.google.com — it takes two minutes and you can use any email address, not just Gmail. Once you are signed in to Analytics, click the blue "Start measuring" button or the "Create" button if you already have an account.

Google will ask you to name your account (this is just for your own reference — "My Business" or "My Website" is fine) and then create a property. A property is the container for one website. Name it after your website or business. Then enter your website's URL, select your industry category (or leave it blank), and choose your reporting timezone. The timezone matters because Analytics groups your data by day, and it uses this timezone to decide when a day starts and ends.

After you create the property, Google shows you a Measurement ID (it looks like G-XXXXXXXXXX). This is the code that connects your website to Analytics. Copy this ID — you will need it in the next step.

Add the tracking code to your website

The method depends on how your website is built. If you use WordPress.com, Wix, Squarespace, or Shopify, look for a settings menu labeled "Integrations," "Connected apps," or "Analytics." Paste your Measurement ID into the Google Analytics field and save. You are done — these platforms handle the code for you.

If you have a self-hosted WordPress site (wordpress.org, not wordpress.com), install a plugin like MonsterInsights or Google Site Kit by Google. These plugins connect your Analytics account to WordPress automatically. Go to your WordPress dashboard, click "Plugins," search for the plugin name, install it, and follow the setup wizard. The plugin will ask you to sign in with your Google account and select your Analytics property.

If you have direct access to your website's HTML code, you need to add the tracking code manually. In Google Analytics, go to your property settings and find the "Data streams" section. Click on your website's data stream and copy the entire tracking code (it starts with <script> and ends with </script>). Paste this code into the <head> section of every page on your website, or into a header template if your site uses one. If you are not comfortable editing HTML, ask your web developer to do this step.

Wait for data to appear and check your dashboard

After you add the tracking code, Google needs 24 to 48 hours to start collecting data. During this time, the Analytics dashboard will show zero visitors. This is normal. Do not assume the code did not work — wait at least two days before troubleshooting.

Once data arrives, log into analytics.google.com, select your property, and click "Home" to see your dashboard. The main numbers you will see are: total users (how many different people visited), sessions (how many separate visits happened), and pageviews (how many pages were viewed in total). Below that, you can see which pages got the most traffic, what countries visitors came from, and what devices they used.

Understand what the main reports show you

The Users report shows how many different people visited your website. A user is identified by a cookie — a small file stored on their browser. If the same person visits on two different devices or browsers, Analytics counts them as two users. The number is an estimate, not a perfect count, because some visitors block cookies or use privacy tools.

The Pages and Screens report shows which pages people actually read. If you have a blog with ten posts but only three get traffic, this report shows you which three. You can use this to decide what to write about next or which pages need better links from your homepage.

The Traffic sources report shows where visitors came from: search engines (organic), direct links (they typed your URL or clicked a bookmark), referral links (they clicked a link from another website), or social media. This tells you whether your search engine visibility is working or whether you need to focus on other ways to reach people.

Add Google Analytics to your privacy policy

Google Analytics collects information about visitors — their location, device type, pages they visit, and how long they stay. If you have a privacy policy on your website, add a sentence saying you use Google Analytics to track visitor behavior. You do not need a long explanation, just something like: "We use Google Analytics to understand how visitors use our website. Google may use this data according to their privacy policy."

If you do not have a privacy policy yet and your website collects any visitor information (which Analytics does), you should create one. Many website builders have built-in privacy policy generators. If you are in the European Union or California, privacy laws require you to tell visitors about tracking and give them a way to opt out, so a privacy policy is more important in those places.

Troubleshoot if data is not appearing

If 48 hours have passed and you still see zero visitors, check these things. First, verify the tracking code is actually on your website. Open your website in a browser, right-click, and select "View page source." Search for your Measurement ID (G-XXXXXXXXXX). If you do not find it, the code was not added correctly. Go back and re-add it, or ask your developer to check.

Second, make sure you are looking at the right property. In Google Analytics, check that the property name matches your website. If you created multiple properties by accident, you might be looking at the wrong one.

Third, check whether your website has a robots.txt file or meta tags that block search engines. These do not block Analytics, but they sometimes indicate a testing or staging site that is not meant to be tracked. If your website is a test site, you may want to exclude it from Analytics anyway so your real traffic numbers stay clean.

If you still see no data after checking these things, wait another day or two. Sometimes Google takes longer than 48 hours, especially if your website gets very little traffic.

Frequently Asked Questions

Do I need to pay for Google Analytics?

No. Google Analytics is free for websites of any size. Google does offer a paid version called Google Analytics 360 for very large companies, but the free version works for almost all websites and includes all the core features you need to understand your traffic.

Can visitors see that I am tracking them?

No. The tracking code runs invisibly in the background. Visitors do not see a notification or popup unless you add one yourself. However, you should mention Analytics in your privacy policy so visitors know you are collecting data about them.

What if I want to exclude my own visits from the data?

You can filter out your own IP address so your visits do not count as traffic. In Google Analytics, go to Admin settings, find the Filters section, and create a filter that excludes traffic from your IP address. This keeps your own testing and browsing from inflating your visitor numbers.

Can I see real-time visitor activity?

Yes. In Google Analytics, click "Real-time" in the left menu to see visitors on your website right now. This shows active users, which pages they are on, and where they came from. It updates every few seconds and is useful for checking whether a new page or link is getting traffic when ready after you publish it.

What if my website builder does not have a built-in Analytics connection?

You can still add Google Analytics manually by pasting the tracking code into your website's HTML. Most website builders have a section for custom code or header scripts. If you cannot find it, contact your website builder's support team and ask where to add a Google Analytics tracking code.