Home Forums WoodMart support forum How to Install Google Tag Manager on My WoodMart Theme Without a Plugin

How to Install Google Tag Manager on My WoodMart Theme Without a Plugin

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #639316

    lost.hinata
    Participant

    Hello,

    I want to install Google Tag Manager (GTM) on my website, but I don’t want to use any extensions. I want to install it directly in my theme files.

    I am using a child theme.

    Should I install the scripts in the child theme, or should they go in the main theme? Here’s where GTM recommends placing the codes:

    Where to place the GTM code?
    GTM consists of two parts that must be placed in specific locations:

    The main script script → Inside head
    Must be placed as high as possible in <head> to load quickly.
    Ensures that tags fire at the beginning of the page load.

    The <noscript> tag → Right after <body>
    Must be placed immediately after the opening <body> tag.
    Allows GTM to load even if JavaScript is disabled.
    Never place it in the footer!

    Can you tell me exactly how to do this?

    Also, if you know of a reliable plugin that makes installation easier, let me know. But keep in mind that the second script must not be placed in the footer.

    Thanks!

    #639349

    Hung Pham
    Keymaster

    Hi lost.hinata,

    Thanks for reaching to us.

    Please check the article below for help:

    https://www.wpbeginner.com/beginners-guide/how-to-install-and-setup-google-tag-manager-in-wordpress/

    https://prnt.sc/LD5TV5347bVo

    Kind Regards

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