Created
April 7, 2023 07:27
-
-
Save LaxusCroco/ad824d2aebd729cdaedb43b89f941e5c to your computer and use it in GitHub Desktop.
Add Google Tag Manager to JetThemeCore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Google Tag Manager code for the <head> tag. | |
*/ | |
function custom_add_gtm_code() { | |
?> | |
<!-- Add your GTM code snippet below this line --> | |
<?php | |
} | |
add_action( 'wp_head', 'custom_add_gtm_code' ); | |
/** | |
* Add Google Tag Manager code for the <body> tag. | |
*/ | |
function custom_add_gtm_code_noscript() { | |
?> | |
<!-- Add your GTM code snippet below this line --> | |
<?php | |
} | |
add_action( 'wp_body_open', 'custom_add_gtm_code_noscript' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment