Category "google-analytics-api"

How to get the number of currently active users instead of the 30 minutes count in GA4?

I've recently added a Google Analytics GA4 tag to a website for the purpose of counting the currently active users. Before, I could see the number of real-time

How do I add a metric name to MetricOrderBy when using Google.Analytics.Data.V1Beta?

I am writing come code in c# with Visual Studio 2022 to fetch Google G4 analytics data and cannot get one piece to work correctly. It is the part where a create

How to get the invitation for Provisioning API??

How to get the invitation for Provisioning API?? Per this article its only available by inviation: https://developers.google.com/analytics/devguides/config/p

Sending server-side events to GA4 using API

I've been using Google's documentation to attempt to build/test server-side events for GA4 using Postman. I've found the event to work when using their event bu

GA4 Conversion tracking using Measurement Protocol

[Edited. Added code sample and more explanations] Is anybody familiar with the GA4 Measurement Protocol? We are sending events from our backend servers to the s

Setting proxy for Google Analytics Data API (GA4)

I need to config proxy credential for GA4 Client library to pass it from http proxy server, unfortunately there isn't any rich documentation for this purpose on

GA4 custom event from server side, can someone tell me how i can do the following code in php?

const measurement_id = `G-XXXXXXXXXX`; const api_secret = `<secret_value>`; fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measureme