Google Analytics detector

Google Analytics logo

How can you check if a website has Google Analytics by looking at the source code?

Detecting Google Analytics on a website by examining the page source involves searching for specific code snippets or identifiers associated with Google Analytics.

Here’s a step-by-step guide on how to do it:

  1. Open the Page Source: Right-click on the webpage and select “View Page Source” or press Ctrl+U (Windows) or Cmd+Option+U (Mac) to open the page’s source code.
  2. Search for Google Analytics Tracking IDs: Use Ctrl+F (Windows) or Cmd+F (Mac) to open the search function and look for the following keywords: UA-: Represents Universal Analytics tracking IDs. Example: UA-12345678-1. G-: Indicates Google Analytics 4 (GA4) tracking IDs. Example: G-1A2B3C4D5E.
  3. Look for Google Analytics Script Tags: Search for script tags that load Google Analytics scripts: <script async src=”https://www.google-analytics.com/analytics.js”></script>.
  4. Look for Google Analytics Cookies: Check if the website sets cookies like _ga, _gid, or _gat, which are associated with Google Analytics.