client/components/tinymce/plugins/editor-button-analytics/plugin.js
function trackBodyClick( event ) {
		if (
			editorEventAncestor( event, '.mce-colorbutton' ) &&
			! editorEventAncestor( event, '.mce-open' )
		) {
			// This could be a click on the foreground color button to apply
			// the previously selected foreground color.  Unfortunately this
			// line is never executed - there must be another event handler
			// keeping the event from bubbling up.
			recordTinyMCEButtonClick( 'forecolor_pick_current' );
		} else if ( editorEventAncestor( event, '.mce-listbox' ) ) {
			// This is a click on the format dropdown button
			recordTinyMCEButtonClick( 'format_dropdown' );
		} else if ( closest( event.target, '.mce-menu-item' ) ) {
			// This is a menu item in the format dropdown.  Only track which
			// specific item is clicked for english interfaces - the easiest
			// way to determine which item is selected is by UI text.
			const reduxStore = editor.getParam( 'redux_store' );
			const locale = reduxStore ? getCurrentUserLocale( reduxStore.getState() ) : 'en';
			if ( locale === 'en' ) {
				const text = closest( event.target, '.mce-menu-item' ).textContent;
				const menuItemName = text
					.toLowerCase()
					.trim()
					.replace( /[^a-z0-9]+/g, '_' );
				recordTinyMCEButtonClick( 'format_dropdown_' + menuItemName );
			} else {
				recordTinyMCEButtonClick( 'format_dropdown_non_english' );
			}
		}
	}
function trackBodyClick( event ) {
		if (
			editorEventAncestor( event, '.mce-colorbutton' ) &&
			! editorEventAncestor( event, '.mce-open' )
		) {
			// This could be a click on the foreground color button to apply
			// the previously selected foreground color.  Unfortunately this
			// line is never executed - there must be another event handler
			// keeping the event from bubbling up.
			recordTinyMCEButtonClick( 'forecolor_pick_current' );
		} else if ( editorEventAncestor( event, '.mce-listbox' ) ) {
			// This is a click on the format dropdown button
			recordTinyMCEButtonClick( 'format_dropdown' );
		} else if ( closest( event.target, '.mce-menu-item' ) ) {
			// This is a menu item in the format dropdown.  Only track which
			// specific item is clicked for english interfaces - the easiest
			// way to determine which item is selected is by UI text.
			const reduxStore = editor.getParam( 'redux_store' );
			const locale = reduxStore ? getCurrentUserLocale( reduxStore.getState() ) : 'en';
			if ( locale === 'en' ) {
				const text = closest( event.target, '.mce-menu-item' ).textContent;
				const menuItemName = text
					.toLowerCase()
					.trim()
					.replace( /[^a-z0-9]+/g, '_' );
				recordTinyMCEButtonClick( 'format_dropdown_' + menuItemName );
			} else {
				recordTinyMCEButtonClick( 'format_dropdown_non_english' );
			}
		}
	}
/*
Track clicks on a couple of odd controls that aren't caught above.
Using `document.body` because the format dropdown menu is a direct child
of `document.body` (not a descendant of `editor.container`).