-
Notifications
You must be signed in to change notification settings - Fork 286
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
Handle the special case for “new visitors” and “returning visitors” to retrieve their metrics for the Selection Panel #8160
Comments
Thanks @benbowler, this IB is heading in the right direction. A few points:
|
Thanks @benbowler. This IB LGTM ✅ Please note, I made a small amendment to make it clear we want to ignore rows where the |
QA update
|
Thanks @kelvinballoo! I will try to clear things up for you.
It's fine to use a property which already has the new/returning visitor audiences set up, the main thing is to ensure they are in the partial data state so you can see a difference in the figures between the actual Audiences in GA4 (i.e. via reports using the Of course if you already have them created the audiences probably won't have zero user counts as mentioned in the AC - I just specified the QAB this way for simplicity and to accentuate the difference between the actual audience figures vs the special case figures.
Please bear in mind this issue only handles the metrics in the Selection Panel. The Audience Tiles will still show the actual audience data and the partial data badge until issue #8144 is implemented.
This is out of scope for this issue as per the above. However, thanks for raising the bug - it's important to fix, I've added AC and moved it to the IB column.
As per the above the tiles are out of scope here and will be updated via issue #8144. This difference is expected for now.
You are comparing the wrong data. When the real audiences are the in partial data state and the special case handling kicks in, we retrieve the data for these "audiences" via a report that uses
This catches everyone out at first! It is not the case that new + returning = all visitors. In fact, visitors can be new within a timeframe, and then visit the site again and be flagged as a returning visitor as well. Here is a Slack thread where this is discussed which also links out to this support query. It's also mentioned on the design doc, and is the reason we have the new/returning audience tooltips text e.g.: Hope that clarifies things, please let me know if you have any further questions! |
QA update
|
Thanks @kelvinballoo. It's unlikely to be a time gap issue as the end date for our reports is yesterday rather than the current day. It's more likely these differences can be explained by the last point in my comment on #7214.
Essentially we should expect some minor discrepancies when comparing API reports to GA4 UI Reports and Explorations. |
QA Update ✅Thanks for clarifying @techanvil . The selection panel for 'New visitors' and 'Returning visitors' are pulling accordingly from the GA retention report, albeit with a minor discrepancy for the 'Returning visitors', which is expected. Moving ticket to approval. |
Feature Description
Implement the special case for “new visitors” and “returning visitors” on the Selection Panel whereby their metrics are retrieved using the
newVsReturning
dimension instead of via the audience until the corresponding audiences are out of the "partial data" state.See special case to avoid "partial data" state in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
newVsReturning
dimension rather thanaudienceResourceName
.Implementation Brief
Note: This issue may have some implementation shared with the related issue #8144.
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/AudienceItems.js
,availableAudiences
useSelect
:siteKitAudiences
anduserAudiences
, using theisSiteKitAudience
selector.siteKitAudiences
are in partial data state using theisAudiencePartialData
selector, assigning the result to a variableisSiteKitAudiencePartialData
:isSiteKitAudiencePartialData
istrue
:newVsReturning
dimension report usinggetReport
, with the dates, the metrictotalUsers
and the dimensionsnewVsReturning
. No need to pass any dimension filters.: newVsReturningRows
.audiences
array, however, ifisSiteKitAudiencePartialData
istrue
, setuserCount
for the Site Kit audiences using the rows from thenewVsReturning
report. Ensure that rows wherenewVsReturning
is(not set)
are ignored, only taking values from rows which have the dimension valuenew
orreturning
.Test Coverage
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/index.stories.js
, for partial data state for newVsReturningAudiences.QA Brief
audienceSegmentation
feature flag enabled, and connect Analytics to a property which has data.newVsReturning
dimension), rather than the zero user counts of the newly created audiences.Note: When first landing on the dashboard after connecting Analytics, you may see a couple of failed requests to
save-resource-data-availability-date
. The fix for this is outside the scope of this issue, and there is a separate issue for it: #8888.Changelog entry
The text was updated successfully, but these errors were encountered: