Search code examples
google-analytics-api

How to access report data in a "App + Web" google analytics property using The Google Analytics Reporting API v4?


I have a Web+App google analytics property, and I need to access report data using The Google Analytics Reporting API v4. In the docs, the field viewId is required to build a ReportRequest object. But, in the new google analytics Web+App feature, you cannot create a view from the property.


Solution

  • For GA4 Properties, you need to use the Google Analytics Data API v1. See the devsite: https://developers.google.com/analytics/trusted-testing/analytics-data

    App + Web Properties were recently renamed to GA4 Properties. See the blog post: https://blog.google/products/marketingplatform/analytics/new_google_analytics/.

    The Google Analytics Reporting API v4 (https://developers.google.com/analytics/devguides/reporting/core/v4) accepts numeric view identifiers in report requests. GA4 Properties do not have views, and there is not a way to create views in those properties.