blackcowmoo / grafana-google-analytics-datasource

Grafana Google Analytics datasource
https://grafana.com/grafana/plugins/blackcowmoo-googleanalytics-datasource/
Apache License 2.0
38 stars 17 forks source link

[BUG] Data difference between gav4 and gav3 #63

Closed lcc3108 closed 11 months ago

lcc3108 commented 1 year ago

Describe the bug Collect data with gav3 and gav4 on the same site. The two data are different. In case of gav4, yesterday's data is not inquired

Grafana Version & Plugin Version grafana : 9.5.2 plugin : 0.2.0(not released) To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior same data

Screenshots in gav4(https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport?hl=ko)

image
Click to toggle contents of `response` ``` { "dimensionHeaders": [ { "name": "dateHour" } ], "metricHeaders": [ { "name": "active1DayUsers", "type": "TYPE_INTEGER" } ], "metadata": { "currencyCode": "KRW", "timeZone": "Asia/Seoul" }, "kind": "analyticsData#runReport" } ```

gav3(https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet?hl=ko)

image
Click to toggle contents of `response` ``` { "reports": [ { "columnHeader": { "dimensions": [ "ga:dateHour" ], "metricHeader": { "metricHeaderEntries": [ { "name": "ga:1dayUsers", "type": "INTEGER" } ] } }, "data": { "rows": [ { "dimensions": [ "2023060201" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060202" ], "metrics": [ { "values": [ "2" ] } ] }, { "dimensions": [ "2023060208" ], "metrics": [ { "values": [ "4" ] } ] }, { "dimensions": [ "2023060209" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060210" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060211" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060213" ], "metrics": [ { "values": [ "3" ] } ] }, { "dimensions": [ "2023060214" ], "metrics": [ { "values": [ "7" ] } ] }, { "dimensions": [ "2023060215" ], "metrics": [ { "values": [ "3" ] } ] }, { "dimensions": [ "2023060216" ], "metrics": [ { "values": [ "3" ] } ] }, { "dimensions": [ "2023060217" ], "metrics": [ { "values": [ "2" ] } ] }, { "dimensions": [ "2023060218" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060221" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060223" ], "metrics": [ { "values": [ "4" ] } ] }, { "dimensions": [ "2023060309" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060311" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060314" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060319" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060320" ], "metrics": [ { "values": [ "1" ] } ] }, { "dimensions": [ "2023060323" ], "metrics": [ { "values": [ "2" ] } ] } ], "totals": [ { "values": [ "41" ] } ], "rowCount": 20, "minimums": [ { "values": [ "1" ] } ], "maximums": [ { "values": [ "7" ] } ] } } ] } ```

in grafana(7days)

image

Additional context Add any other context about the problem here.

lcc3108 commented 1 year ago

https://support.google.com/analytics/thread/219125994?hl=en&sjid=12201511561317302878-AP

lcc3108 commented 1 year ago

When I personally tested it, the data seems to be checked late.

lcc3108 commented 11 months ago

https://github.com/blackcowmoo/grafana-google-analytics-datasource/issues/106#issuecomment-1846869470