Tips on Customizing GTM Kit – Google Tag Manager & GA4 integration

How to Hide GTM Kit Admin Menus

function plt_hide_gtm_kit_menus() {
	//Hide "GTM Kit".
	remove_menu_page('gtmkit_general');
	//Hide "GTM Kit → General".
	remove_submenu_page('gtmkit_general', 'gtmkit_general');
	//Hide "GTM Kit → Integrations".
	remove_submenu_page('gtmkit_general', 'gtmkit_integrations');
	//Hide "GTM Kit → GTM Templates".
	remove_submenu_page('gtmkit_general', 'gtmkit_templates');
	//Hide "GTM Kit → Upgrades".
	remove_submenu_page('gtmkit_general', 'gtmkit_upgrades');
	//Hide "GTM Kit → Help".
	remove_submenu_page('gtmkit_general', 'gtmkit_help');
}

add_action('admin_menu', 'plt_hide_gtm_kit_menus', 21);

Where do I put this code?

How to Hide the "GTM Kit" Meta Box

function plt_hide_gtm_kit_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "GTM Kit" meta box.
	remove_meta_box('gtmkit_options', $screen->id, 'side');
}

add_action('add_meta_boxes', 'plt_hide_gtm_kit_metaboxes', 20);