Skip to content

Commit

Permalink
Merge pull request #563 from newfold-labs/migration-events-fix
Browse files Browse the repository at this point in the history
fix for migration event
  • Loading branch information
arunshenoy99 authored May 16, 2024
2 parents bb6d299 + b20c27d commit 38248a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/OnboardingSPA/steps/SiteGen/Migration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { store as nfdOnboardingStore } from '../../../store';
import { FOOTER_SITEGEN, HEADER_SITEGEN } from '../../../../constants';
import {
OnboardingEvent,
trackOnboardingEvent,
sendOnboardingEvent,
} from '../../../utils/analytics/hiive';
import { SITEGEN_FLOW } from '../../../data/flows/constants';
import { ACTION_MIGRATION_INITIATED } from '../../../utils/analytics/hiive/constants';
Expand Down Expand Up @@ -56,13 +56,15 @@ const StepSiteGenMigration = () => {
const response = await getSiteMigrateUrl();
const migrateUrl = response?.body?.data?.redirect_url;
if ( migrateUrl ) {
trackOnboardingEvent(
sendOnboardingEvent(
new OnboardingEvent(
ACTION_MIGRATION_INITIATED,
migrateUrl
)
);
window.open( migrateUrl, '_self' );
setTimeout( () => {
window.open( migrateUrl, '_self' );
}, 3000 );
} else {
updateSiteGenErrorStatus( true );
}
Expand Down

0 comments on commit 38248a9

Please sign in to comment.