google / google/site-kit-wp

Ensure the Info Notice is only shown when suitable data is available

Open
#8,140 6 comments 0 reactions 1 assignee Assigned to @aaemnnosttv View on GitHub
Feature: Audiences Module: Analytics P2 Team M Type: Enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 14h
Merged PRs (30d)
77

Description

## Feature Description

Ensure that the Info Notice is only shown when there is suitable data available (e.g. the metric which the message is discussing is in a non-zero state) for the current message.

If there is no suitable data for the current message, the next message can be shown instead, with the current one shown when data does become available.

See [info notice](https://docs.google.com/document/d/1MGD5Djy6AeeZC4zBtHqS-lQEWD9jw0kf-IIWw-jLCFU/edit#heading=h.8f364rk7fiu0) in the design doc.

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

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

## Acceptance criteria

- The Info Notice should only be shown when there is suitable data available for the current message.
- If there is no suitable data for the current message, the next message can be shown instead, with the current one shown when data does become available.
- In order to avoid a layout shift, the notice may be shown on the page load subsequent to determining the conditions for showing the message, in order for the requisite data to be cached and presented to the client on page load. It might however be turn out to be unfeasible to avoid a layout shift in all cases so this isn't a strict requirement.
- The specific per-message conditions are as follows, with each message listed in turn:
- 1.
- Message: _The higher the portion of new visitors you have, the more your audience is growing. Looking at what content brings them to your site may give you insights on how to reach even more people._
- Conditions: The "new visitors" audience should be selected and have a non-zero user count over the past 90 days.
- 2.
- Message: _Select up to three visitor groups to display on the dashboard and easily compare metrics between them._
- Conditions: There should be less than three audiences in the current selection, and at least one unselected audience in the list of available audiences.
- 3.
- Message: _Configure your own custom audiences in Analytics to gain deeper insights into visitor behavior. For example, consider creating an “Existing customers” or “Subscribers” group, depending on what goals you have for your site._
- Conditions: This should not be shown if the user has already created both an audience named "Existing customers" and an audience named "Subscribers".
- Note: The initially implemented copy for this message is slightly different, and it should be updated to match the above. See https://github.com/google/site-kit-wp/issues/8140#issuecomment-2179087687.
- 4.
- Message: _Select the "Purchasers" visitor group to gain insights into which visitors bring the most revenue to your site._
- Conditions: The Purchasers default audience should not be selected, and should have a non-zero user count over the past 90 days.
- Note: Again, the copy should be updated to match the above.
- 5.
- Message: _The more returning visitors your site has, the stronger and more loyal an audience you’re building. Check which content brings people back to your site - it might help you create a strategy to build a community._
- Conditions: The "returning visitors" audience should be selected and have a non-zero user count over the past 90 days.
- 6.
- Message: _Compare the ratio of “new” to “returning” visitors – this can give you insights on whether you have more people stopping by as a one-off, or more loyal visitors._
- Conditions: Both the "new visitors" and "returning visitors" audiences should be selected and have a non-zero user count over the past 90 days.
- 7.
- Message: _Check the cities which bring you more new vs more returning visitors – there might be new audiences you could engage with in locations you hadn’t thought about._
- Conditions: Both the "new visitors" and "returning visitors" audiences should be selected and have a non-zero user count over the past 90 days.

## 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.