googleapis / google-api-php-client

A PHP client library for accessing Google APIs
http://googleapis.github.io/google-api-php-client/
Apache License 2.0
9.29k stars 3.52k forks source link

What Adsense metric to use to get estimated earnings per page path? #2340

Closed TheCrowned closed 9 months ago

TheCrowned commented 1 year ago

Given the upcoming retirement of the Analytics Reporting API, we are now forced to use the new Analytics Data API to query Analytics data. Now, Universal Analytics properties could be linked to Adsense, and we could then use the metric adsenseRevenue combined with the pagePath dimension to obtain a report of what pages had generated how much revenue in a given timerange. The problem is that the new GA4 properties do not support being linked to the respective Adsense, and the adsenseRevenue metric is duly absent from the list. At the same time, the Adsense reporting API in this package does not seem to have any pagePath dimension.

So the issue is: how do we generate a report of pages <-> revenue with new GA4 properties (for thousands of pages, so no url filtering)? Is it going to become impossible, or have I simply not found it?

AbdulazizSobh commented 1 year ago

Why doesn't the Google team care to support and fix these problems They are really going downhill and if they continue like this they will be a bad team Please solve this problem related to this discussion because it is really important

ikuleshov commented 9 months ago

Hi,

While the question is not specific to the PHP client, Google Analytics now supports linking with AdSense.

saranshdhingra commented 9 months ago

Thanks for the update on this @ikuleshov Apologies for the delay on the reply on this thread @AbdulazizSobh and @TheCrowned

Closing this as per @ikuleshov's response.