google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 291 forks source link

The `POST sync-audiences` endpoint is requested multiple times on page load. #9362

Closed techanvil closed 1 month ago

techanvil commented 1 month ago

Bug Description

Steps to reproduce

  1. Set up Site Kit with the audienceSegmentation feature flag enabled, and click on Enable groups to set up the feature.
  2. Reload the dashboard.
  3. See multiple POST requests to the sync-audiences endpoint in the network devtools.

Screenshots

image

Additional Context


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

techanvil commented 1 month ago

Update: The required change is being made in a current PR, so this issue should not need any additional changes. I'll hold onto it for now, and retest once #9352 is merged.

https://github.com/google/site-kit-wp/blob/736d815bae610fd1d2ec67de3edb9df93d955b33/assets/js/modules/analytics-4/datastore/audiences.js#L243-L245

techanvil commented 1 month ago

Closing this issue, I've retested it now #9352 and this issue is indeed no longer occurring.