New Landing How can we help? Cardinal Google Manager Tag

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Cardinal
  • #125971
    AlbatiQue
    Member
    Post count: 46

    Hey,

    I’m installing the google manager tag.
    Google recommends to add the code right after the opening body tag <body>.

    I’m using the following plugin https://wordpress.org/plugins/duracelltomi-google-tag-manager/ where you can chose the plugin to add the code or custom install after the body tag.
    I want to install it after the body tag because google recommends this.But I don’t want to change my template core files so what hook can I use for this in the function.php?

    This would be the code I need to paste
    <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>

    Thanks

    #126016
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    There is no hook in WordPress that puts content just after the <body> tag, I suggest you to edit the header.php file in the child theme or create your own action to do that.

    Thanks,
    laranz.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register