[Resolved] Goolge Tag Manager / Elementor Canvas

Home Forums Support [Resolved] Goolge Tag Manager / Elementor Canvas

Home Forums Support Goolge Tag Manager / Elementor Canvas

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #582242
    Fitz

    I’ve read thru many feeds and tried many things, but can’t get the GTM, no script, recognized in <body>.
    I have the main Tag Working, but for the body tag keep getting “GTM no-script code not found: either missing or not in <body>”.
    All my pages are built with GP Premium 1.6.2, Child Theme, Elementor Canvas Templates, Elementor Pro 2.0.7.
    I’ve added the GTM script to the wp_head Hook.
    Added the GTM noscript to the Before Header Hook and to the child theme functions file as directed in other posts,
    added after // END ENQUEUE PARENT ACTION
    ===================================================
    // FP 052218 added per GeneratePress for Google Tag Manager body

    add_action( ‘generate_before_header’, ‘tu_add_google_tag_manager’, 0 );
    function tu_add_google_tag_manager() { ?>

    <!– Google Tag Manager (noscript) –>
    <noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX&#8221;
    height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
    <!– End Google Tag Manager (noscript) –>

    <?php }

    // FP 052218 end of Google Tag Manager
    ==================================================
    Per other posts, I’m not using any cache plugins.
    Any suggestions to get GTM fully implemented in the <body>

    GP Premium 1.6.2
    #582276
    Tom
    Lead Developer
    Lead Developer

    Using the Canvas page template in Elementor removes everything theme related from the page, including our hooks.

    You can:

    a) Ask Elementor what you can do within their page template.
    b) Use the default page template, and disable the GP elements using the Disable Elements metabox.

    #582282
    Fitz

    Thank You for the very quick response, and for the information to get GTM working.

    #582763
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.