Guest Posted November 4, 2014 Share Posted November 4, 2014 I created an account in Google tag manager and they gave me a code to add to my website after the <body>. But where would I add it? Link to comment
colin.irwin Posted November 5, 2014 Share Posted November 5, 2014 You should add it to the Footer Code Injection Point, this will add it to the end of each page before the closing </body> If you're looking for a Squarespace Developer, drop me a line. Link to comment
geekgirlweb1570047771 Posted November 5, 2014 Share Posted November 5, 2014 Guides:http://help.squarespace.com/guides/using-code-injectionhttp://help7.squarespace.com/guides/using-code-injection Link to comment
Guest Posted November 6, 2014 Share Posted November 6, 2014 Thank you Silva, I do know that pasting the code in the footer will inject it before the closing body tag but i need to inject the code right after the opening body tag. Google tag manager will not work if the code is not in the right place which is right after the opening body tag. Link to comment
Marius Posted November 10, 2014 Share Posted November 10, 2014 got the same problem with google tag manager. it still works if injected in the header, but webmasterstools wont allow it as verification anymore online marketing lover Link to comment
Scoobie Posted November 10, 2014 Share Posted November 10, 2014 Have you raised a bug report to support? I'm pretty sure this worked on ss6 Link to comment
lauren2234 Posted April 3, 2015 Share Posted April 3, 2015 I couldn’t get the tag manager to work when it was in the header. The code seemed to load, and I didn’t get an errors in my console when I stuck the GTM code in the header (or footer), but when I used the Tag Assistant (Google Chrome extension) it gave me an error that said my tag was detected, but it wasn’t in the correct place (which is right after the opening <body>). These instructions worked for me: How to inject the Google Tag Manager script into a Squarespace template with jQuery – hope that helps! Link to comment
ceisenbraun Posted July 28, 2015 Share Posted July 28, 2015 lauren2234 , Chris here, I wrote that post. I'm glad you found it helpful! If anyone has any questions about adding GTM , shoot me an email.http://www.chriseisenbraun.com/news Link to comment
jasonechambers Posted August 24, 2015 Share Posted August 24, 2015 ceisenbraun - your post worked for me too, thank you! I thought I was going to beat my head against a wall for hours trying to get that to work. Link to comment
jasonechambers Posted August 24, 2015 Share Posted August 24, 2015 ceisenbraun - your post worked for me too, thank you! I thought I was going to beat my head against a wall for hours trying to get that to work. Link to comment
ceisenbraun Posted August 25, 2015 Share Posted August 25, 2015 Jason, thrilled I could save both your wall, and skull some dents! Link to comment
Guest Posted December 1, 2015 Share Posted December 1, 2015 Following these instructions inserts the code into the Head of the page not the Body. Can you please advise how you get it in the body and not the head of the page. Thanks. Link to comment
Guest Posted December 1, 2015 Share Posted December 1, 2015 Following these instructions inserts the code into the Head of the page not the Body. Can you please advise how you get it in the body and not the head of the page. Thanks. Link to comment
Guest Posted December 1, 2015 Share Posted December 1, 2015 Hi Chris, Your instructions on your page result in the code being injected in the header before the body. Is it possible to get the code immediately after the body? If so how?Thanks :) Link to comment
ceisenbraun Posted December 1, 2015 Share Posted December 1, 2015 Hello Colinc. In my instructions, I use - jQuery('body').prepend - to add the script. This will prepend the script (or elements, etc) as the first child of the element. It will not add anything to the . I'm unclear why you suggest it would. If I'm misunderstanding something, please let me know. Thanks! Link to comment
colin.irwin Posted December 1, 2015 Share Posted December 1, 2015 Doesn't using jQuery to insert the script mean that it will only start running after the document has completely loaded, thus possibly missing events? If you're looking for a Squarespace Developer, drop me a line. Link to comment
jeng Posted August 22, 2016 Share Posted August 22, 2016 "Footer Code added here is injected into the tag on every page in your site. The tag comes before the closing tag." From Squarespace's guide: https://support.squarespace.com/hc/en-us/articles/205815908-Using-Code-Injection Link to comment
Guest Posted July 20, 2017 Share Posted July 20, 2017 Refer to my answered post: https://answers.squarespace.com/questions/136265/how-do-i-add-google-tag-manager-tag.html?childToView=185765#answer-185765 Worked perfectly for me Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.