diff --git a/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx b/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx index 06862502169..29af7037332 100644 --- a/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx +++ b/plugins/woocommerce-admin/client/marketplace/components/discover/discover.tsx @@ -13,6 +13,7 @@ import ProductLoader from '../product-loader/product-loader'; import { MarketplaceContext } from '../../contexts/marketplace-context'; import { ProductType } from '../product-list/types'; import './discover.scss'; +import { recordMarketplaceView } from '~/marketplace/utils/tracking'; export default function Discover(): JSX.Element | null { const [ productGroups, setProductGroups ] = useState< @@ -28,10 +29,17 @@ export default function Discover(): JSX.Element | null { return product.id; } ); + // This is a new event specific to the Discover tab, added with Woo 8.4. recordEvent( 'marketplace_discover_viewed', { view: 'discover', product_ids, } ); + + // This is the new page view event added with Woo 8.3. It's improved with the marketplace_discover_viewed event + // but we'll keep it for a while to keep it compatible. + recordMarketplaceView( { + view: 'discover', + } ); } // Get the content for this screen diff --git a/plugins/woocommerce/changelog/51163-fix-21486-iam-discover-tracks b/plugins/woocommerce/changelog/51163-fix-21486-iam-discover-tracks new file mode 100644 index 00000000000..f2459934217 --- /dev/null +++ b/plugins/woocommerce/changelog/51163-fix-21486-iam-discover-tracks @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak +Comment: Fix missing Tracks event from the Extensions > Discover page +