• Resolved El Teu Espai

    (@carlos28031980)


    To enter the code tagManager
    Option A

    add_action(‘genesis_before’, ‘google_tag_manager’);
    function google_tag_manager() { ?>
    <!– Google Tag Manager –>
    <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>
    <!– End Google Tag Manager –>
    <?php
    }

    Option B

    //* Codigo de tag Manager en el Body
    add_action(‘genesis_before’, ‘google_tag_manager’);
    function google_tag_manager() { ?>
    <!– Google Tag Manager –>
    <noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-XXXXX”
    height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
    new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
    ‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,’script’,’dataLayer’,’GTM-XXXXX’);</script>
    <!– End Google Tag Manager –>
    <?php
    }

    Thanks

    https://wordpress.org/plugins/duracelltomi-google-tag-manager/

Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    If you are using Genesis, just select the “codeless” or “custom” placement option in my plugin and do not add any extra code into your theme. My plugin will automatically use the hook “genesis_before” to add the proper container code.

    Thomas

Viewing 1 replies (of 1 total)

The topic ‘DuracellTomi's framework Gensis’ is closed to new replies.