Currently, in my project "dev--sci" I do not see a third column with View Settings to get my view ID from (need this to call Google Analytics API).
I followed the directions from this stack overflow answer, which called for creating a new universal property. However, this appears to take me out of "dev--sci" altogether and create a new project called "views (UA-XXXXXX)", which does have the View Settings. But I need the view ID for my original "dev--sci" project, not this blank new one.
How do I get the view ID for my original project "dev--sci" and why doesn't it have the third view column? I believe it's b/c GA V4 doesn't have views, but then for some reason their API still requires it?
As you read in that post, GA4 does not have views, so if you are looking for a view ID to be able to use the APIs that require it in GA4, it means that you are using the wrong APIs, i.e. those that work with Universal Analytics (UA-XXXXX- XX).
GA4 uses a completely different data model from that of Google Analytics, for this reason the APIs to be used are different.
Here you can find some information about Google Analytics Data API V1 that provides programmatic methods to access report data in Google Analytics 4 (GA4) properties:
https://developers.google.com/analytics/devguides/reporting/data/v1
However, as you can see, this is an early preview version of the API and is subject to change:
Related
I've faced a comparability problem while migrating from Reporting API V4 to Data API V1 (Beta). Some old (UA) metrics became not available.
Several of them are computable at client side.
For example:
avgSessionDuration(ga:avgSessionDuration) = userEngagementDuration(ga:sessionDuration) / sessions(ga:sessions)
pageViewsPerSession(ga:pageviewsPerSession) = screenPageViews(ga:pageviews) / sessions(ga:sessions)
The question is: How to obtain equivalent data for listed below UA metrics using Data API V1?
ga:uniquePageviews
ga:avgTimeOnPage
Universal analytics and GA4 are two totally different systems your not going to be able to convert a report. You need to make new reports designed for GA4.
GA4 does not have uniquePageviews or avgTimeOnPage
You should check API Dimensions & Metrics to find the current list of dimensions and metrics available with Ga4.
Remember Ga4 is Event based not page view based.
It seems to be available. check this page for GA4 equivalents:
https://developers.google.com/analytics/devguides/reporting/data/v1/migration-api-schema-mapping
Im getting the data succesfully by using:
Dimension: fullPageUrl
Metrics: eventCount, userEngagementDuration
Google Analytics (particularly version 4, "GA4") has various predefined events, each with its own parameters. E.g. the purchase event has an items parameter, which contains data such as item_id and item_name for each purchased item. JS code on a website can send these events and pass the extra data, and I can actually see the data in the "Analysis hub" in the Google Analytics interface.
Is there a way to also fetch this extra data using the Google Analytics Data API? There is a way to retrieve some predefined dimensions and also "custom dimensions" (via customEvent:parameter_name), but e.g. purchase item data doesn't seem to be a part of that.
Do I have to define custom dimensions (e.g. a purchasedProductId) and send them in addition to the items parameter, if I want to access this data via API?
Jan,
Ecommerce reporting is not yet supported in the Google Analytics Data API. I will update this question once I have more information about the timeline of this feature implementation.
Thanks,
Ilya
The Google Analytics Team
I have setup a new Google Analytics 4 property and have enabled enhanced tracking, which records all downloads automatically. When using Google Data Studio, I can see 'file_download' events (so it's definitely working) and use this data to build my report.
I need to create a report that shows which files were downloaded each month for a specific page only. It's really easy to get the total number of downloads which occurred on that page, however, I can't for the life of me find any way to report what the destination URL or file name was.
According to the Analytics support pages, the event has a number of useful parameters (file_extension, file_name, link_classes, link_domain, link_id, link_text, link_url), however, I can't see any related options for these in the Data Studio reports.
Any help would be greatly appreciated. At this point, I'm almost tempted to disable the automatic tracking and do it all manually via Tag Manager again.
It is possible create reports with the useful parameters. However, you need to register the parameters in Google Analytics first.
To register the customer dimensions, navigate to "All events", click "Manage Custom Definitions", and add custom dimensions for each parameter. This article goes through the details of registering custom dimensions: https://support.google.com/analytics/answer/10075209?hl=en. In this example, I've registered three dimensions (one for each parameter):
Once the dimensions are registered, Google Analytics will record the dimensions going forward. You should be able to create reports on these dimensions in Data Studio the next day. Here's the example reports:
Am I understanding it correctly that to get started with Google Analytics 4 (GA4) that I set-up the property in GA first and then go to my Universal property > Tracking Info > Tracking Code > Connected Site Tags and then enter the GA4 code and the new information will be entered into the Universal property without duplication (meaning, I won't be seeing Universal and GA4, just the new data)?
Would it be best to keep these two separate for now and monitor the data in each property by adding the GA4 code below the Universal code? TIA.
The two systems are different and use a different data model so you can't have the data mixed, the two properties are distinct.
Best practices say to track data in parallel to both old and new property.
The SDK reference
https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/userActivity/search
shows that custom dimensions are part of the result Activity, but custom metrics are not mentioned
I have a very simple problem, but cannot seem to find the answer anywhere:
How can I get the google analytics data, event by event, including my custom metrics?
Lets say given a client id
I have tried connecting the dataLayer variables through Tag Manager to Google Analytics in various ways and cannot find the custom metrics in detail (i.e. raw, event by event) anywhere in Analytics - Seems that only Analytics 360 allows it via BigQuery; but there must be a way using the SDK
Or is it just not possible?