Skip to content

Commit

Permalink
Site Migrations: Add Tracks events to site migration instructions lin…
Browse files Browse the repository at this point in the history
…ks (#91011)

* Tracks event

* Update naming

* fix sub property

* Remove event param
  • Loading branch information
sixhours committed May 22, 2024
1 parent f556bfe commit d1838d6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ const SiteMigrationInstructions: Step = function ( { flow } ) {
}
}, [ flow, setupError, siteId ] );

const recordInstructionsLinkClick = ( linkname: string ) => {
recordTracksEvent( 'calypso_site_migration_instructions_link_click', {
linkname,
} );
};

const stepContent = (
<div className="site-migration-instructions__content">
<ol className="site-migration-instructions__list">
Expand All @@ -110,6 +116,7 @@ const SiteMigrationInstructions: Step = function ( { flow } ) {
href={ getPluginInstallationPage( fromUrl ) }
target="_blank"
rel="noreferrer"
onClick={ () => recordInstructionsLinkClick( 'install-plugin' ) }
/>
),
},
Expand All @@ -127,6 +134,7 @@ const SiteMigrationInstructions: Step = function ( { flow } ) {
target="_blank"
rel="noreferrer"
fallback={ <strong /> }
onClick={ () => recordInstructionsLinkClick( 'go-to-plugin-page' ) }
/>
),
migrateButton: <DoNotTranslateIt value="Migrate" />,
Expand Down

0 comments on commit d1838d6

Please sign in to comment.