Skip to content

Reader Editor: Add Tracks events when editor card opens and closes #102228

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

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions client/reader/following/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import SuggestionProvider from 'calypso/reader/search-stream/suggestion-provider
import ReaderStream, { WIDE_DISPLAY_CUTOFF } from 'calypso/reader/stream';
import { useDispatch, useSelector } from 'calypso/state';
import { getCurrentUser } from 'calypso/state/current-user/selectors';
import { useRecordReaderTracksEvent } from 'calypso/state/reader/analytics/useRecordReaderTracksEvent';
import { selectSidebarRecentSite } from 'calypso/state/reader-ui/sidebar/actions';
import Recent from '../recent';
import { useSiteSubscriptions } from './use-site-subscriptions';
Expand All @@ -26,6 +27,7 @@ function FollowingStream( { ...props } ) {
const { isLoading, hasNonSelfSubscriptions } = useSiteSubscriptions();
const dispatch = useDispatch();
const currentUser = useSelector( getCurrentUser );
const recordReaderTracksEvent = useRecordReaderTracksEvent();
const hasSites = ( currentUser?.site_count ?? 0 ) > 0;

// Set the selected feed based on route param.
Expand Down Expand Up @@ -85,6 +87,10 @@ function FollowingStream( { ...props } ) {
useInert
onOpen={ () => {
focusEditor();
recordReaderTracksEvent( 'calypso_reader_editor_card_opened' );
} }
onClose={ () => {
recordReaderTracksEvent( 'calypso_reader_editor_card_closed' );
} }
>
<QuickPost />
Expand Down
Loading