• Resolved capbussat

    (@capbussat)


    Which is the recommended way to install Google Tag manager in WP 6,3 with theme Twenty Twenty Three and please some directions.

    I have the requirement to include in WordPress in Twenty Twenty Three, but I have receivedonly two code snippets to include one in <head> and one in <body>. Is it possible? Where do I begin? I have a child theme but I can not see the way to do it. There is no file ‘header.php’ so I am confused.

    I have also seen there is a Google Site Kit which , probably, would be ok if a user with Google login credentials installs it, but I have not tried it because SEO its not my responsibility.

    I have seen already a GTM4WP plugin which I think has to be configurated manually, I suppose by the SEO people.

    Thanks

    Ignasi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @capbussat ! Editing theme files like header.php is not a recommended way of adding header code. A nicer way is to use a plugin that allows you to add code to your site’s header and body. You can find a number of such plugins on the plugin repository.

    To add some context, newer Block themes use a different template structure, and you can read more about this on the theme developer handbook if you’re interested in the details.

    Thread Starter capbussat

    (@capbussat)

    Thanks, I think a plugin for inserting in header is a way to go. Have you tried Code Snippets or WP Code?

    Moderator Felipe Santos

    (@foosantos)

    Hi @capbussat,

    Not properlypurple here, but I personally had some experience using Code Snippets, and it works well, but honestly all these seem to be quite similar, so I would recommend you to use the plugin ratings as a reference.

    If you don’t need something with a lot of features (just a basic thing to add the GTM code), you might also consider Insert Headers And Footers and similar simple plugins as it will have a more direct approach.

    Thread Starter capbussat

    (@capbussat)

    Thanks @foosantos and @properlypurple , I finally decided in favor of a similar simple plugin Tag Manager – Header, Body And Footer. So far it seems to work correctly.

    Also, I have reviewed some of the code before installing it and I like (from a programmers point of view) the code because is understandable and well commented which is a safety plus to recommend it,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google tag manager in Twenty Twenty Three with or withous plugins?’ is closed to new replies.