Google Analytics 4 API - Missing dateHourMinutes - google-analytics

It looks like Google Analytics 4 API doesn't offer reporting to the minutes. The closest I can see in the Query Explorer is Date + Hour.
Is there a way to obtain data accurate to the minutes with GA4 reporting API?

One workaround could be to capture the hit timestamp as a custom dimension. Here's an example: https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/#4-hit-timestamp
Note that link I shared sets up a custom dimension for Universal Analytics, not GA4. So for GA4 you would need to capture it as an event parameter and then create the custom dimension in the GA4 interface.
Alternatively, you could enable the export to BigQuery and the following field is provided in the schema: event_timestamp

Google Analytics 4 Data API added three new dimensions today: dateHourMinute, minute, and nthMinute. This page lists all dimensions and metrics available in the API.
These dimensions are compatible with some but not all other dimensions and metrics. For example, minute is compatible with eventCount and activeUsers, but minute is not compatible with newUsers. We're adding a new API method to show which dimensions and metrics are compatible with other dimensions and metrics.
Thanks,
Brett
The Google Analytics Team

Not sure if there is a workaround but GA have said in April that they plan to add dateHourMinutes to GA4 API.

Related

How to obtain UA metrics data from Google Analytics Data API (GA4)

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

Retrieve Google Analytics 4 event parameters via API

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

iOS: Issues with switching from Google Analytics to Firebase Analytics

I am using Google Analytics for years for my iOS apps and was truly satisfied with it. For my regret Google is sunsetting Google Analytics later this year so I am switching to Firebase API so I can keep tracking my apps. I already done most of the integration work and can see the events appearing in Firebase console. However, I can't see custom parameter values but only event count.
For example, sending event named add_book and adding parameter named isbn with value of 1234, I will be able to see in the console only the number of times that add_book arrived and also that it contains an isbn parameter. However, it seems there is no way to view the value (i.e. 1234) of the isbn parameter. I registered the isbn parameter for the add_book event as required. Am I missing something?
Does having the full functionality of the sunsetting Google Analytics (including advanced filtering + regex filters, etc.), means I should use both Firebase Analytics and BigQuery together?
By the way, I linked Firebase Analytics with BigQuery and exported the data as suggested by Firebase Analytics, but I can't see any Analytics tables yet in BigQuery. Do I need to allow several hours before I can view the exported data?
As of March 2019, Firebase Analytics is not so easy to use or test when setting it up (in comparison to Google Analytics). The main steps for setting up event parameters are:
Send your events with their event parameters. Send at least 80-90 events of one type, otherwise the parameters will appear as zero or "not set", until you reach 80 individual events.
The events will not display in the website until after one day. So wait for 24 hours.
When the events appear on the website, you must register their event parameters, with the '3 dots' menu -> "Edit Parameter Reporting" - Like this:
Then:
(Image credit: Firebase Analytics custom events params and Firebase Analytics. Can not add custom parameter to event )
After registering the event parameters, you must wait another 24 hours to see the parameters displayed on the website.
More info:
https://www.reddit.com/r/androiddev/comments/9zbvk4/alternative_to_google_analytics_not_firebase/
https://www.tatvic.com/blog/firebase-analytics-reporting-tips-overcome-limitations-favorite-mobile-app-analytics-tool-google/
In your event overview from Firebase Console you can enable parameter reporting for individual events. The option is found in the 3 dot overflow menu.
You can do that for up to 10 unique text parameters and 40 unique numeric parameters.
Beyond those limits or for more control BigQuery is the way to go. And yes you need to wait for your first data in BigQuery. They populate a new table with one days data every day once.

ga:productPrice via the Analytics Core Reporting API (v3)

Team!
We're currently pushing the product price (ga:productprice) to GA as explained both in the Importing Product Data using the Management API documentation and the Measuring an Addition or Removal from Cart from the Enhanced Ecommerce documentation, but now we find unable to query it, as this metric does not appear in the Analytics Core Reporting API (v3)documentation. It's that correct?
What is the usefulness of pushing this data to GA if we cannot query it later? It's really kind of strange that you could use ga:ProductBrand, ga:ProductSku... but no the price.
Any clarification on this one would be helpful.
Regards,
Alex
There is no dimension called ga:productPrice in Google Analytics. But there are other metrics in GA like ga:transactionRevenue, ga:revenuePerItem, ga:itemRevenue and other transaction and revenue related metrics. Here is the list of Ecommerce related dimension and metrics.
Hope it helps !

How to check google analytics api parameters from google analytics interface

I am using google analytics api to get data. I am getting data but I want to verify two parameters those are always 0 in a particular date range. I am getting ['ga:transactions'] and ['ga:goalCompletionsAll'] . These two parameters are always zero in google analytics api response.
So I just want to know is there any way I can check these two parameters from google analytics web interface against some particular date range?
You could test it using a Custom report on the website:
Link to the custom report above, just import it it will show with your data.
The report is just Goal Completions and transactions by Date

Resources