Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure cached audiences are resynced when the No Audiences Banner is shown #9214

Closed
6 tasks done
techanvil opened this issue Aug 20, 2024 · 2 comments
Closed
6 tasks done
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature

Comments

@techanvil
Copy link
Collaborator

techanvil commented Aug 20, 2024

Feature Description

At present, when the conditions are met for showing the No Audiences Banner, the list of cached audiences will no longer be synced periodically. We should ensure they continue to be synced, showing the appropriate loading state while the sync is in progress.


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

Acceptance criteria

  • When the conditions are present for showing the No Audiences Banner, the user is an an authenticated user, and the list of cached audiences were last synced over an hour ago:
    • The list of cached audiences should be resynced.
    • Two Audience Tiles should be displayed in the loading state while the cached audiences are being resynced.

Implementation Brief

In order to synchronise the display of the No Audiences Banner with the Audience Tiles loading state, we'll remove the registration of NoAudiencesBannerWidget as a standalone widget, and instead render it inline in AudienceTilesWidget.

Test Coverage

  • Add JS test coverage for the changes to AudienceTilesWidget.

QA Brief

  1. Enable audience segmentation feature and enable the visitor groups. Property should have the Site Kit audience created (New visitors and Returning visitors), if not, create them.

  2. Add "New Visitors" and "Returning Visitors" tiles in dashboard using audience selection panel.

  3. In tester plugin settings, Analytics > Force Analytics Audiences, select has-no-site-kit-created-audiences and save.

  4. Go to SK dashboard, there should be a no audience banner displayed in audience tiles area.

  5. Install Time Travel extension in chrome.

  6. Set the time in extension to more than 1 hour later.

  7. Refresh the dashboard and notice in network tab, there should be a request sent to sync-audiences endpoint. When you disable the extension, there should be no request to the endpoint if done within an hour.

  8. To verify that two loading tiles are shown when audiences are being synced, set the network throttling in chrome to 3G. Enable Time Travel extension and refresh the SK dashboard. You should see two loading audiences tiles when sync-audiences request is being processed.

Changelog entry

  • Ensure cached audiences are resynced when the No Audiences Banner is shown.
@techanvil techanvil added Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature labels Aug 20, 2024
@techanvil techanvil self-assigned this Aug 20, 2024
@ivonac4 ivonac4 added Team M Issues for Squad 2 Next Up Issues to prioritize for definition labels Aug 22, 2024
@techanvil techanvil removed their assignment Sep 10, 2024
@nfmohit
Copy link
Collaborator

nfmohit commented Sep 11, 2024

IB ✅

@ivonac4 ivonac4 removed the Next Up Issues to prioritize for definition label Sep 12, 2024
@ankitrox ankitrox self-assigned this Sep 13, 2024
@ankitrox ankitrox removed their assignment Sep 16, 2024
@techanvil techanvil assigned techanvil and ankitrox and unassigned techanvil Sep 16, 2024
@ankitrox ankitrox assigned techanvil and unassigned ankitrox Sep 18, 2024
@techanvil techanvil removed their assignment Sep 18, 2024
@mohitwp mohitwp self-assigned this Sep 25, 2024
@mohitwp
Copy link
Collaborator

mohitwp commented Sep 26, 2024

QA Update ✅

  • Tested on dev environment.
  • Tested using Time Travel extension.

Verified that-

  • on refreshing the dashboard , a request sent to sync-audiences endpoint under network tab.
  • when we disable the extension, there is no request to the endpoint if done within an hour.
  • the list of cached audiences gets resynced.
  • Two Audience Tiles display in the loading state while the cached audiences are being resynced.

image

Recording.1426.mp4

@mohitwp mohitwp removed their assignment Sep 26, 2024
@tofumatt tofumatt closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants