Description
Proposed Changes
- This PR adds the clicks summary card to the stats overview

It also fixes two things:
- Clicking on a link in the Email Opens card while being in another view than “Days” would error
- Add a property
metricLabel
to the <StatsModule />
component. This allows overriding the default “Views” metric label. This property is then passed on to the <StatsCard />
component. There was already a some code present to show a different metric label, but it was not as extensible:
metricLabel={ moduleType === 'filedownloads' ? translate( 'Downloads' ) : undefined }
Testing Instructions
-
Apply this PR
-
Apply D99268-code
-
Make sure public-api.wordpress.com
-
Visit http://calypso.localhost:3000/stats/day/<yoursite>?flags=newsletter/stats
(replace yoursite
with your own site & don’t forget the flag)
-
Make sure two boxes are present at the bottom called “Email opens” & “Email clicks”.
-
Change the view to something else than “Days” & see if the links in both these boxes work.
-
Make sure those boxes say Opens & Clicks as a metric:

Pre-merge Checklist
- Has the general commit checklist been followed? (PCYsg-hS-p2)
- Have you written new tests for your changes?
- Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
- Have you checked for TypeScript, React or other console errors?
- Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
- Have we added the “[Status] String Freeze” label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
- For changes affecting Jetpack: Have we added the “[Status] Needs Privacy Updates” label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?
Related to #
Unfortunately, no screenshots were provided by the developer.