Add Google Tag Manager to the WordPress header. Replace <!– Paste Google Tag Manager Code Here –> with the code provided by Google Tag Manage
<?php
add_action('wp_head', function() {
?>
<!-- Google Tag Manager -->
<!-- Paste Google Tag Manager Code Here -->
<!-- End Google Tag Manager -->
<?php
});