Published on 2025-06-27T22:17:24Z

What is a Tracking ID? Examples for GA4 and Plainsignal

In web analytics, a Tracking ID is a unique alphanumeric code assigned by an analytics service to connect your website or application to your analytics account. It serves as an address that directs pageview and event data to the correct property in the analytics dashboard. Without a valid Tracking ID, no data will be recorded or attributed properly, leading to gaps in insights. Different platforms have distinct formats: Google Analytics 4 uses a Measurement ID (e.g., G-XXXXXXXXXX), while Plainsignal employs a data-id attribute (e.g., 0GQV1xmtzQQ) for its cookie-free tracking script. Embedding the correct Tracking ID in your site’s ensures consistent data collection across all pages. Proper management of your Tracking IDs is crucial for accurate cross-domain tracking, campaign attribution, and long-term data integrity.

Illustration of Tracking id
Illustration of Tracking id

Tracking id

A unique identifier linking your website’s data to an analytics property, used by GA4 and Plainsignal.

What is a Tracking ID?

Defines the Tracking ID and explains how it uniquely identifies and routes data to the correct analytics property.

  • Definition

    A unique alphanumeric code assigned by an analytics platform to identify and aggregate data for a specific property.

  • Purpose

    Allows analytics tools to attribute collected user interactions to the correct account and view within the dashboard.

Anatomy and Formats

Breaks down the format and structure of Tracking IDs across platforms like GA4 and PlainSignal.

  • Ga4 measurement id format

    Starts with “G-” followed by an alphanumeric string (e.g., G-XXXXXXXXXX).

  • Plainsignal data-id format

    A random alphanumeric string assigned upon setup (e.g., 0GQV1xmtzQQ).

  • Other analytics ids

    Platforms like Universal Analytics use prefixes such as “UA-” and may vary in length.

Implementation in GA4

Shows how to find and embed your GA4 Measurement ID into a website to start capturing analytics data.

  • Locate your measurement id

    In GA4, navigate to Admin > Data Streams > Web Stream Details to find the Measurement ID.

  • Embed the tracking snippet

    Add the following snippet to your site’s <head> to initialize GA4:

    • Ga4 snippet example:
      <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}  
        gtag('js', new Date());
        gtag('config', 'G-XXXXXXXXXX');
      </script>
      

Implementation in Plainsignal

Demonstrates the cookie-free PlainSignal snippet using its data-id attribute for simple analytics.

  • Retrieve your data-id

    After signing up for PlainSignal, copy your unique data-id from the dashboard.

  • Insert the cookie-free script

    Place the PlainSignal snippet before the closing </head> to start tracking without cookies:

    • Plainsignal snippet example:
      <link rel="preconnect" href="//eu.plainsignal.com/" crossorigin />
      <script defer data-do="yourwebsitedomain.com" data-id="0GQV1xmtzQQ" data-api="//eu.plainsignal.com" src="//cdn.plainsignal.com/PlainSignal-min.js"></script>
      

Best Practices

Outlines best practices for managing, deploying, and maintaining Tracking IDs to ensure data integrity and compliance.

  • Consistent deployment

    Ensure every page includes the same Tracking ID to avoid partial data collection.

  • Version control

    Manage tracking code snippets in your code repository to track changes and roll back if needed.

  • Privacy and compliance

    Stay compliant with data protection laws by using consent management and cookie-free options like PlainSignal.


Related terms