[ Web Proxy ]
URL:
Viewing: https://developers.google.com/analytics/devguides/collection/ga4 [Back]  [Original]

Google Analytics for developers  |  Google for Developers Skip to main content
Send feedback

Google Analytics for developers Stay organized with collections Save and categorize content based on your preferences.

outlined_flag

Before using the Google Analytics APIs and developer products, make sure you've followed the steps in Get started with Google Analytics to set up your account, create a property, and add a data stream.

Terms of Service: By using Google Analytics, you agree to the Google Analytics Terms of Service. Review these terms carefully.

Set up measurement

For more details on setting up Google Analytics, see the following developer guides:

Automate your Analytics solution

Google Analytics offers the following developer products that you can use to manage your Google Analytics integration at scale:

You are responsible for complying with all applicable privacy laws and regulations, including obtaining necessary user consent for data collection and usage.

Google Consent Mode provides a way to adjust your Google tags' behavior based on the consent choices of your users. Implementing Consent Mode is essential for respecting user privacy preferences while still enabling valuable measurement and analytics.

To understand how Consent Mode works and its benefits, read the Consent mode overview.

Consent mode is typically implemented using a Consent Management Platform (CMP) or a custom consent banner. Detailed instructions are available for:

We recommend that you consult with your legal team to ensure your consent mechanisms meet all regulatory requirements.

Learn about Google Analytics

If you're new to Google Analytics, we recommend starting with the Google Analytics Certification on Skillshop.

The certification course offers videos and training modules to help you learn about Google Analytics and how you can get the most out of it for your business. You can also watch a subset of these training videos on our YouTube channel.

For information about the Google Analytics property, see Meet the next generation of Google Analytics.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],["Google Analytics measures traffic and engagement across platforms. Users can learn via the Google Analytics Certification on Skillshop or YouTube videos. Developers should set up an account, property, data stream, and data collection before using APIs. Setup involves website tagging, app engagement measurement, and e-commerce tracking. Google Analytics provides developer products like the Data API for reporting, Admin API for configuration, Measurement Protocol for sending events, and User Deletion API for data removal.\n"]]

Web Proxy Viewer  |  New URL  |  Original Page