- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
What's the best way to implement Google Tag Manager? Latest GTM requires one code snippet to sit globally within <head> tags and the 2nd code snippet to sit globally on every page, immediately after the opening <body> tag.
What is the best practice for adding the 2nd code snippet to <body> section of every page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
For the code that needs to go between the <head> tags, add that to Settings > SEO > Header Code. For code that needs to go at the top of a page under the <body> tag, add it to the page using the Embed Code element above all your other content.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
The last sentence does not make sense to me. Google Tag Manager asks us to "Additionally, paste this code immediately after the opening <body> tag:"
I went to my Weebly website's Settings > SEO page. I see a block labeled "header" and "footer," and I understand what to put there. I know that I can get the Embed Code element from Weebly's Build and I understand how to add it to a "real" page's design, but I do not see how to add an Embed Code to the Settings > SEO page.
Do you mean that we should drag it and add it to the content of a "real" page? Won't everybody see it there?
You guys usually provide very helpful and clear answers, but this one has me stumped~~ thanks for explaining what you mean again.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
No worries, MAcevedo!
You have the basics right. The "Body" section of the site in a Weebly site is where you drag elements and content. If you drag an Embed Code element onto the page, and paste the code there, it will be placed in the Body section. Code doesn't appear visibly the same way plain text does, and analytics code like this shouldn't appear at all.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Adam, how about on the /blog/ page? My blog page is set up to just show a snippet of each post. There doesn't appear to be anywhere on that page where I can drop an embed tag.
Thanks,
Trisha
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
For the blog, you'd probably need to customize the HTML of whichever page type the blog page uses (this would also add it to any other page of the site using the same page type). You can do that by going to the Theme tab, click Edit HTML / CSS, then clicking on the appropriate page template to the left.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
In my Weebly site, with regard to the second snippet that goes directly after the body tag, that appears only available on Theme where I then can edit the HTML. So I have 4 pages within the website - but only need to add that second snippet to the theme in one place?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Adam, I already have the code for Google Analytics in the Header Code box in the SEO section of Settings... now Google wants me to install a tag for phone number click tracking, can 2 codes exist in the same Header box?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi @monaghan1976. Yes, you can have mulitple codes in the header and footer section.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
So if I am doing an google analytics tag and a phone tracking tag in the Header section of the SEO Settings, would I just stack them on top of each other like this?
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'XX-1234567891-1', 'auto');
ga('send', 'pageview');
</script>
<script>
gtag('config', 'XX-123456789/abdcefg1a2-av1ab', {
'phone_conversion_number': 555-555-1212'
});
</script>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hm.. never heard of a phone tracking script, but yes, that is how you would do it. I like to keep a space or 2 between them to keep it easy to manage.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
I'm so sorry, but I still don't get it... it shows only a header and footer place to put the code... so where do I put the body tag? is that just for additional pages... not the home page? Sorry I'm such a neophyte...
Bonnie
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
It's ok, @Bonnie1 - it's not always clear from directions where to place things. Does it say to put it right before the closing body tag? If so, add it to the Footer Code field. If it says to put it in the Head area then add it to the Header Code field.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi Adam,
I've read several of these threads as well as outside blogs on how to set up GTM in Weebly and it is very confusing. GTM has provided 2 snippets of code. The first to be placed in the header. I pasted this into the SEO page in the Header box under Settings. As for the second snippet of code, it says to paste the code immediately after the <body> code. Should this code go into the box titled Footer? I have also read posts where it says to place the code inside the html under theme.
Can you please clear this up in the most basic instructions possible.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi @Condoleeza Sounds like you are on the right track. Try using the Embed Element in the builder bar to add the second code to the body. Drag/drop onto your page then paste the code in.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hello! I have pasted the first code into the header. But when I past the second code into an "Embed Code" box at the end of my blog which is where I want the Like and Share buttons to appear, there's just a blank space where the buttons should be? Any tips please?
A previous solution read:
For the blog, you'd probably need to customize the HTML of whichever page type the blog page uses (this would also add it to any other page of the site using the same page type). You can do that by going to the Theme tab, click Edit HTML / CSS, then clicking on the appropriate page template to the left.
Community Manager
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi @sandiola. It sounds like you are adding the code properly. Can you post a link to the blog page you are referring to? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Thank you Bernadette! It's http://www.sandyloyall.com.au/articles/what-if-you-are-coping-you-just-think-you-arent
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Super sorry for the delay, @sandiola! It's been a bit hectic with the holidays. Your blog looks great and it looks like you figured out the social media buttons?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hi Bernadette ~
No! I hadn't realised! That's strange... just a delay of some kind??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Possibly, but let me know if you are still running into an issue. Happy Holidays!!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report