How Does Google Analytics Track My Site Visitors?

Are you wondering how Google Analytics tracks your site visitors?

Google Analytics requires a tracking code inserted into every page you wish to gather data on:

With this snippet inserted, you will start collecting data that is then made available from within Google Analytics.

With ExactMetrics installed on your WordPress site, you automatically take advantage of best practices, quick setup, and easy insights. We serve the most informative numbers right within your WordPress dashboard.

If you’re a Pro user or higher, you take advantage of advanced tracking features:

How Does That Code Track My Site Visitors?

Google Analytics tracks user behavior and other information through cookies and hits.

A cookie is used to track website activity and acts as a visitor’s identification card. This helps GA remember what your visitors did on your website.

Each time the tracking code is triggered by a user’s behavior, GA records that activity. Each interaction is packaged into a hit if using a Universal Analytics property, or as an event if using a Google Analytics 4 property, and sent to Google’s servers

This is an example log of some code being sent back to Google:

Some examples of data that is sent back to Google:

  • Which pages your visitors view on your website.
  • If your visitors view a form and if they make a form submission.
  • If they exit your website, what link they exit on.
  • And so much more!

That’s it! Google Analytics simply tracks your visitors with a little bit of JavaScript. What’s next? Learn more about Google Analytics:  What is Google Analytics?