0 points

Add GTM to WordPress


dashboard

Tue Nov 17 2020 14:06:24 GMT+0000 (UTC)

Posted by @shm1ckle #php #javascript

add_action('wp_head', 'add_gtm');

function add_gtm() {
	?>
	{{INSERT SCRIPT HERE}}
<?
}

add_action( 'wp_body_open', 'add_gtm_no_script' );

function add_gtm_no_script() {
	?>
	{{INSERT SCRIPT HERE}}
<?
}
content_copy Copy