x

New Google Tag Manager Website

Google Tag Manager is asking me to put in some code (highlighted) after the <body> tag and I am not sure where I can put it with regards to the SEO section of the Weebly Editor.
I see no place I can put it in the theme editor either.
image

8,863 Views
Message 1 of 18
Report
17 REPLIES 17
Square

Is this something you want to have on every page of your site? You should see the opening <body> tag in each of the page templates while editing a theme. If you want to add it to a specific page, add an embed code element above all of your other content and paste the code into that.

8,861 Views
Message 2 of 18
Report

I'm having the same issue but I'd not seeing the HTML code when I go in to edit my theme. I only see the CSS files. How can I get to the HTML in order to put the code after the initial body tag?

8,679 Views
Message 2 of 18
Report
Square

Click on one of the page templates on the left, @Shire1181 - you should see "Header", "No Header", and possibly some others.

8,677 Views
Message 2 of 18
Report

Sorry, This is confusing, I'm in that section but there is nothing that says <body>, where does the code go? under the main.less?

8,648 Views
Message 2 of 18
Report

This is indeed confusing. Are you referring to the Footer / Header functions on each page? Or the Settings SEO area ... again labeled Footer and Header?  If so, which of these is considered the <body>?.  Please be very clear for those of us that haven't yet mastered computer patter. Also, at one point I was advised by Weebly Staff the google tag manager was not need as Weebly auto generated tags for google. Is this no longer correct? Google is seems to be insisting we use their tag manager.   Also, why is the spell check function so funky in this forum area?

Thanks,

PV

7,902 Views
Message 2 of 18
Report

I have the same issue with Google Tag manager. Where does the <body> tag go? I keep getting error messages from Google. 

7,263 Views
Message 2 of 18
Report

I have the same issue - found the SEO Header code area - but where can I find the opening <body> tag ? 

Anyone the wiser?

Thanks

7,055 Views
Message 2 of 18
Report
Square

Anything that goes after the opening body tag should be added to the top of a page of your site with the Embed Code element. I would put it before all other content you add to the page. if you need to add this code to every page of your site, you'll have to edit each of your page templates and paste the code into each template right after the <body> tag. I wouldn't recommend doing that unless you're comfortable working with HTML, though.

7,051 Views
Message 2 of 18
Report

Don't you put the code in SettingsSmiley FrustratedEO:Footer Code? Then it's available for every page.

6,909 Views
Message 10 of 18
Report
Square

If you want it on a specific page, go to the Pages tab, click on the page, click on SEO Settings, then put it in the Footer Code field there.

3,144 Views
Message 10 of 18
Report

Am I correct that you are saying that adding in the themes tab will not place it on every page?

2,866 Views
Message 10 of 18
Report

Was my GTM code placed properly and is the space after the code necessary?

2,863 Views
Message 10 of 18
Report
Square

I'm not super familiar with GTM, but that seems like a lot of code based on what I've come across in the past. I could be totally wrong, but maybe just double check on Google's end. Smiley Happy 

If you want to add the code for every page, you will add it to Settings>SEO>Header. Then make sure to save and publish before moving on to your next steps if you have any. 

2,859 Views
Message 10 of 18
Report

GTM instruction says place as high up in the header, not the footer. Is placing it in the footer special to Weebly?

2,850 Views
Message 10 of 18
Report
Square

Maybe the instructions changed from the first time this post was made. The first user suggested Google wanted it after the closing body tag which would be Settings>SEO>Footer. However, they are telling you the header area? This is where I'm familiar with seeing it placed, and this section would be Settings>SEO> Header. 

2,846 Views
Message 10 of 18
Report

Three Reasons Google Analytics is Worthless for Small Business

https://ducttapemarketing.com/google-analytics-worthless-small-business/

2,796 Views
Message 10 of 18
Report

Can I put my GTM code in one place instead of on every page - that will work on all pages as shown below? With a space after the code y/n?

Theme > header.html :

<!DOCTYPE html>
<html>
<head>

<!-- Google Tag Manager -->
<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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KJB4WPK');</script>
<!-- End Google Tag Manager -->


<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KJB4WPK"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<body class='header-page page-has-banner wsite-theme-light'>

<div class="wrapper">
<div class="dusk-header">
<div class="nav-wrap">
<div class="dummy-nav">{menu}</div>
<div class="container">
<button class="hamburger">
<svg width="22" height="15" viewBox="0 0 22 15" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor" fill-rule="evenodd"><path d="M20.308 2.256H1.128C.505 2.256 0 1.75 0 1.128 0 .505.505 0 1.128 0h19.18c.623 0 1.128.505 1.128 1.128 0 .623-.505 1.128-1.128 1.128zM20.308 8.462H1.128C.505 8.462 0 7.956 0 7.332c0-.622.505-1.127 1.128-1.127h19.18c.623 0 1.128.505 1.128 1.128 0 .623-.505 1.13-1.128 1.13zM20.308 14.667H1.128c-.623 0-1.128-.505-1.128-1.13 0-.622.505-1.127 1.128-1.127h19.18c.623 0 1.128.505 1.128 1.128 0 .624-.505 1.13-1.128 1.13z"/></g></svg>
<span class="sr-only">Menu</span>
</button>
<div class="logo">{logo}</div>
<div class="nav desktop-nav">

2,870 Views
Message 18 of 18
Report