We’ve updated Tracking Scripts Manager.

Version 2.0 is now available in the WordPress.org plugin repository.

Click to expand.

TSM lets you place tracking tags and scripts in the header, footer or body, globally or on specific pages and posts. There isn’t any need to mess with code. You can easily add tags, scripts, and code, or manage existing tags, scripts, and code including editing, updating, reordering and deactivating.

Tracking Script Manager is especially useful for managing advertising tags, social media tracking and retargeting scripts for Facebook and AdWords. It can also be used for analytic scripts including Google Analytics. It can also be used to manage conversion tracking tags and scripts for marketing automation or e-commerce or any other desired action.

Adding and managing tracking scripts has never been easier. Everything you need is available in one screen. We even support after <body>.

After <body> tag support

Tracking Scripts Manager - after <body> tag
Click to expand.

Tracking Scripts Manager makes use of the wp_body_open hook coming in WordPress 5.2. With the standardized function in WordPress 5.2, more and more themes will be including this out of the box. But you can still make use of wp_body_open for Tracking Script Manager now by including do_action( 'wp_body_open' ); in your theme files directly under the opening <body> tag.

Typically the opening <body> tag will be found in your theme’s header.php file. Rather than edit the header.php file directly it is a good practice to create  child theme, copy the header.php there, and make an edit in the child theme. This will prevent you from losing your edits if the main theme has future updates.

Your final code should look something like this

<body>
<?php do_action( 'wp_body_open' ); ?>

This will then allow you to use the After <body> location for your scripts. Great for things like Google Tag Manager and the Facebook Pixel.