-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add GA event tracking for the "Top content" metric area of an Audience Tile #9542
base: develop
Are you sure you want to change the base?
Conversation
…"Top content" metric.
…rror` GA events for the "Top content" metric.
…multiple times within the set of Audience Tiles. This should be addressed in a more correct manner in a future issue.
…_access` and `setup_error_retry` GA events for the "Top content" metric.
…` and `setup_error_cancel` GA events for the "Top content" metric.
…ow for custom dimension creation. This ensures the custom dimension creation is auto-continued.
Build files for 78747fb are ready:
|
Size Change: +3.38 kB (+0.18%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
@@ -77,6 +83,7 @@ export default function AudienceTilePagesMetric( { | |||
|
|||
const redirectURL = addQueryArgs( global.location.href, { | |||
notification: 'audience_segmentation', | |||
widgetArea: AREA_MAIN_DASHBOARD_TRAFFIC_AUDIENCE_SEGMENTATION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug I noticed where the custom dimension creation wasn't auto-continued when returning to Site Kit from the OAuth flow if the Audiences Widget Area isn't currently in view. The fix is to scroll to the widget area upon returning to the dashboard, as we do for the error case (see errorRedirectURL
below).
).toBeInTheDocument(); | ||
} ); | ||
|
||
it( 'should track an event when the Retry button is clicked', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't include tests for the auth_error
, insufficient_permissions_error
and setup_error
events, see Relevant technical choices for the reason behind this.
Summary
Addresses issue:
Relevant technical choices
I didn't include tests for the
auth_error
,insufficient_permissions_error
andsetup_error
GA events, due to difficulties getting theDialog
component'sonOpen
callback to run, it's wrapped inrequestAnimationFrame()
, and even when mockingrequestAnimationFrame()
to invoke its callback, I ran into problems withFocusTrap
. It didn't seem worth pushing the issue over the estimate in order to pursue the coverage for these events.For reference see:
onOpen
is invoked bythis.adapter_.notifyOpened()
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist