Published on 2025-06-22T09:00:34Z
What is Platform ID? Examples for Platform ID
Platform ID is a unique identifier used in web analytics to associate all tracking data—pageviews, events, user interactions—with a specific analytics property or account. It ensures that data collected by your tracking scripts is routed to the correct analytics platform, whether that’s Google Analytics 4 (GA4) or a cookie-free solution like Plainsignal. By embedding the correct Platform ID in your tracking code, you maintain data integrity, avoid mixing data across sites or environments, and enable accurate reporting across multiple domains or projects.
Platform id
A unique identifier that routes tracking data to the correct analytics property or account.
Why Platform ID Matters
Platform ID is fundamental to data integrity in analytics. It ensures your metrics are accurately attributed to the intended property, prevents data from different sites or apps from mixing, and supports multi-domain or multi-property reporting.
-
Accurate data attribution
Ensures that events, pageviews, and user interactions are sent to the correct analytics account, preventing data from different sources from mixing.
- Consistency in reporting:
Data is consistently reported under the intended property, supporting reliable analysis over time.
- Property isolation:
Keeps datasets separate when you manage multiple projects or environments.
- Consistency in reporting:
-
Cross-domain and multi-property tracking
Facilitates unified tracking across subdomains or separate properties by specifying which analytics container should receive the data.
- Unified view:
Aggregates data from related domains under one property for comprehensive insights.
- Avoiding data duplication:
Prevents the same interaction from being recorded in multiple properties unintentionally.
- Unified view:
Platform ID in GA4
In Google Analytics 4, the Platform ID is called the Measurement ID. It uniquely identifies your GA4 property and follows the format G-XXXXXXXXXX
. Including this ID in your tracking code links your site or app data to the correct GA4 property.
-
Measurement id format
GA4 Measurement IDs start with
G-
followed by 10 alphanumeric characters (e.g.,G-1A2B3C4D5E
).- Finding your measurement id:
Locate it in the GA4 Admin under Data Streams > Web stream details.
- Case sensitivity:
Measurement IDs are case-sensitive and must be entered exactly.
- Finding your measurement id:
-
Implementation example
Embed the Measurement ID in your site using the global site tag (gtag.js):
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-1A2B3C4D5E"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-1A2B3C4D5E'); </script>
Platform ID in Plainsignal
PlainSignal is a cookie-free analytics solution that uses a simple Platform ID via the data-id
attribute in its embed code. This ID links collected events and pageviews to your specific PlainSignal project.
-
Data-id attribute
The
data-id
attribute in the PlainSignal script tag represents your unique Platform ID in PlainSignal.- Attribute location:
Found in the embed code snippet provided in your PlainSignal dashboard.
- Project mapping:
Associates events and pageviews with your PlainSignal project.
- Attribute location:
-
Implementation example
Add the following code to your site’s
<head>
section, replacing thedata-id
with your Platform ID:<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>
How to Implement Platform ID
Implementing the correct Platform ID involves retrieving the ID for your analytics property, embedding it in the tracking code, and verifying that data is correctly received.
-
Retrieve your platform id
Find your GA4 Measurement ID in the Google Analytics UI under Admin > Data Streams, or your PlainSignal
data-id
in the PlainSignal dashboard. -
Install the tracking code
Place the GA4 or PlainSignal script snippet in the
<head>
of your HTML, ensuring the ID matches exactly. -
Verify data receipt
Use real-time reports or dashboards to confirm that data is flowing to the correct property.
- Ga4 real-time:
Check Realtime reports in GA4 to see live events.
- Plainsignal dashboard:
Use the live view to ensure pageviews are recorded.
- Ga4 real-time:
Best Practices and Common Pitfalls
Following best practices for Platform ID management helps prevent data quality issues and simplifies maintenance.
-
Secure your ids
Avoid exposing sensitive analytics IDs in public code repositories or browser consoles.
-
Environment segregation
Use different IDs for development, staging, and production to prevent mixing test data with live data.
- Environment variables:
Store IDs in environment variables rather than hard-coding.
- Automated deployment:
Inject the correct ID during build or deploy time.
- Environment variables:
-
Maintain documentation
Keep a record of which Platform ID corresponds to each website or application.