-
Notifications
You must be signed in to change notification settings - Fork 328
[11722] Add GA event tracking for the Analytics setup screen. #11776
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
Changes from 10 commits
f8b25f2
6b6aa0c
de48db5
c18d236
5daa659
00d55fe
54cd414
0c0865f
66a9748
8867812
8d9b9ee
5087bf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,6 +155,7 @@ export default function AccountCreate( { className } ) { | |
| }, [ hasAccountCreateForm, siteName, siteURL, timezone, setValues ] ); | ||
|
|
||
| const showProgress = getQueryArg( location.href, 'showProgress' ); | ||
| const isInitialSetupFlow = !! showProgress && setupFlowRefreshEnabled; | ||
|
|
||
| const handleSubmit = useCallback( async () => { | ||
| const scopes = []; | ||
|
|
@@ -192,11 +193,19 @@ export default function AccountCreate( { className } ) { | |
| } | ||
|
|
||
| setValues( FORM_ACCOUNT_CREATE, { autoSubmit: false } ); | ||
| await trackEvent( | ||
| `${ viewContext }_analytics`, | ||
| 'create_account', | ||
| 'proxy' | ||
| ); | ||
|
|
||
| if ( isInitialSetupFlow ) { | ||
| await trackEvent( | ||
| `${ viewContext }_setup`, | ||
| 'setup_flow_v3_create_analytics_account' | ||
| ); | ||
| } else { | ||
| await trackEvent( | ||
| `${ viewContext }_analytics`, | ||
| 'create_account', | ||
| 'proxy' | ||
| ); | ||
| } | ||
|
|
||
| const { error } = await createAccount( { | ||
| showProgress: showProgress === 'true', | ||
|
|
@@ -210,10 +219,11 @@ export default function AccountCreate( { className } ) { | |
| hasEditScope, | ||
| hasGTMScope, | ||
| setValues, | ||
| viewContext, | ||
| isInitialSetupFlow, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason why you added
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good catch @abdelmalekkkkk , thanks for spotting it. I've added it now. |
||
| createAccount, | ||
| showProgress, | ||
| setPermissionScopeError, | ||
| viewContext, | ||
| setConversionTrackingEnabled, | ||
| saveConversionTrackingSettings, | ||
| ] ); | ||
|
|
@@ -242,8 +252,6 @@ export default function AccountCreate( { className } ) { | |
| return <ProgressBar />; | ||
| } | ||
|
|
||
| const isInitialSetupFlow = !! showProgress && setupFlowRefreshEnabled; | ||
|
|
||
| return ( | ||
| <div className={ className }> | ||
| <StoreErrorNotices | ||
|
|
||
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.
As per my other comment, please move this line to an
afterEach()callback.