google / google/site-kit-wp

GA4 Admin `GET:property` resulting in large percentage of errors

Open
#9,569 0 comments 0 reactions 0 assignees View on GitHub
Module: Analytics Next Up P1 Type: Bug
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 12h
Merged PRs (30d)
80

Description

## Bug Description

The GA4 `property` datapoint is currently fulfilled by a call to `google.analytics.admin.v1beta.AnalyticsAdminService.GetProperty`. While this works in testing, there is a high percentage of these requests that result in errors when looking at the use in cloud admin.

This could be from requests made which the user does not have access to the property any more. It may also be due to requests made in the background which always use the module owner for context in which case failures would not be visible in the dashboard or browser console.

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* When a request for the connected Analytics property fails, the Site Kit dashboard waits an hour before it sends another one. Reloading the page inside that hour sends no new request.
* When a request for the connected Analytics property succeeds, Site Kit saves the property's creation time to the Analytics module settings. While the settings hold that value, every dashboard load reads it and sends no new request.
* The view-only dashboard sends no request for the connected Analytics property.
* When the scheduled property sync can't read the connected Analytics property, the sync waits a day before it runs again.
* The date marker still appears on the All Traffic and Search Funnel widget charts when the property's creation date falls inside the selected date range.
* A property with no saved creation time and no report data still shows the gathering data state.

## Implementation Brief

* [ ]

### Test Coverage

*

## QA Brief

*

## Changelog entry

*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.