Skip to content

Commit

Permalink
Add from param to tracks props
Browse files Browse the repository at this point in the history
  • Loading branch information
sixhours committed May 23, 2024
1 parent a2a916a commit d0e4046
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/blocks/importer/wordpress/upgrade-plan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Title, SubTitle, NextButton } from '@automattic/onboarding';
import { useTranslate } from 'i18n-calypso';
import React, { useEffect } from 'react';
import useCheckEligibilityMigrationTrialPlan from 'calypso/data/plans/use-check-eligibility-migration-trial-plan';
import { useQuery } from 'calypso/landing/stepper/hooks/use-query';
import UpgradePlanDetails from './upgrade-plan-details';

import './style.scss';
Expand All @@ -30,6 +31,7 @@ export const UpgradePlan: React.FunctionComponent< Props > = ( props: Props ) =>
const translate = useTranslate();
const isEnglishLocale = useIsEnglishLocale();
const plan = getPlan( PLAN_BUSINESS );
const fromUrl = useQuery().get( 'from' ) || '';
const {
site,
navigateToVerifyEmailStep,
Expand Down Expand Up @@ -70,6 +72,8 @@ export const UpgradePlan: React.FunctionComponent< Props > = ( props: Props ) =>

const allEventProps = {
...trackingEventsProps,
from: fromUrl,
has_source_site: fromUrl !== '',
migration_trial_hidden: hideFreeMigrationTrial ? 'true' : 'false',
};

Expand Down

0 comments on commit d0e4046

Please sign in to comment.