Last active
August 23, 2019 14:31
-
-
Save jamesmthornton/d1a91e82074f622fa0802697d086300b to your computer and use it in GitHub Desktop.
How to add second script for Google Tag Manager to Genesis on Wordpress (after opening body tag)
This file contains 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
//* add Google Tag Manager after opening body tag for genesis on wordpress (part 2) | |
add_action( 'genesis_before', 'add_custom_google_tag_manager_2', 1 ); | |
function add_custom_google_tag_manager_2() { | |
//* replace XXXXXXX with your GTM tracking ID | |
?> | |
<!-- Google Tag Manager (noscript) --> | |
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" | |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | |
<!-- End Google Tag Manager (noscript) --> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update priority to prevent non-standard implementation notice