Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1226655


    i want to add Google Tagmanager by code but it doesnt works, here the code:

    function google_tag_head_script() {
    new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],

    add_action( ‘wp_head’, ‘google_tag_head_script’ );

    function google_tag_after_body_script() {
    <!– Google Tag Manager (noscript) –>
    <noscript><iframe src=”″
    height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
    <!– End Google Tag Manager (noscript) –><?php

    add_action(‘wp_footer’, ‘google_tag_after_body_script’);



    Hey webdesignaustria,

    This part should be changed in both codes: GTM-0000000′
    Can you give us a link to your site? so we can try to inspect if the script isn’t showing.

    Best regards,


    Hi Nikko,

    yes i know thank, now i have add it in backend in Google services und in the header.php
    is this right?



    Hi webdesignaustria,

    No, the code should be added in your child theme’s functions.php.
    If you don’t have a child theme yet, then you can download and find instructions here:

    Best regards,

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

You must be logged in to reply to this topic.