Skip to content
Advertisement

Tag: google-analytics-4

How to get all properties for Google Analytics GA4 accounts

How do I list all properties for all account using Google Analytics GA4 through PHP? For universal analyitcs I’m using the following: However, this method only allows me to retrieve Universal analytics properties, not the new GA4 ones. The official documentation was of no help at all. Answer Google analytics GA4 is not the same as universal analytics. You can

GA4 run report setting metrics & dimenssion

Using php laravel i am implementing GA4 data analytics api to get metrics data of my GA4 client website but i am unable to find method setName in Google_Service_AnalyticsReporting_Metric class when running script with out adding name i am getting error here is my code Answer Please replace “Google_Service_AnalyticsReporting_Metric” with “Google_Service_AnalyticsData_Metric”. After replacing that variable, the setName method should be

Advertisement