AdSense dash not showing up for newly enabled site
Bug Description
When there are ads serving (showing data in the main dashboard), the AdSense tab is still showing "we're getting your site ready for ads" instead of stats dashboard.
Steps to reproduce
Set up AdSense with an existing account with low traffic.
Expected behavior
The AdSense dashboard showing up.
Screenshots
Additional Context
With newly added sites.
N/A
N/A
Do not alter or remove anything below. The following sections will be managed by moderators only.
Changelog entry
- Ensure that Site Kit dashboard informs the user if there is an issue with the AdSense account, rather than showing empty AdSense stats.
Acceptance criteria
- Main dashboard and product subreport should reflect the account state in a coordinated manner.
- If there are AdSense earnings data available, it should be shown in both the main dashboard and the subreport. (in this case, as soon as ad impressions are available via API, stop showing the "we're getting your site ready for ads" notice in the subreport)
- If there is an issue with the account (e.g. approval state, user input required), users should be notified in both the main dashboard and the subreport without delay b/w the two.
Implementation Brief
When setting up AdSense with an account pending review, Earnings in site kit dashboard show 0 values while AdSense dashboard renders appropriate message.
The same way that <AdSenseDashboardWidget /> has the logic in place to render <AdSenseInProcessStatus /> when zeroData is true, we need to add this logic to <DashboardEarnings /> to render <AdSenseInProcessStatus /> when there is no data.
This should solve the discrepancy between both components, once we get data from AdSense they would both show earnings.
In the main Site Kit dashboard it does display the basic AdSense dashboard:

Clicking on the "Adsense" tab from the Site Kit panel results in the below:

@lucymtc could you work on an implementation brief for this one?
Noting for the team that @lucymtc is OOO today (Jul 10) but can pick this up tomorrow, no problem (Jul 11). Thanks!
Implementation brief ready for review
@lucymtc would you please add a label for your estimate and then move it to the Engineering board? Thank you!
@felixarntz @adamsilverstein as it will be difficult to QA this ticket if you don't have a newly AdSense account I am adding link to screen recording with my testing https://drive.google.com/file/d/1iEaGK7MTDGefzKT5ur8hmu-j8DWrtGqy/view?usp=sharing Data is shown in the AdSense page as soon as impressions are higher than 0, as well as in the main dashboard.
verified the AdSense module shows a CTA on the Site Kit Dashboard when the data is empty:

Once there is data, the section shows correctly:

QA passes, moving to Approval.