Adding Google Tag Manager to Squarespace

Google tag Manager (GTM) tool allows you to observe all the tags that are featured on your Squarespace website via one easy-to-use platform. With the help of special features called “containers”, Google Tag Manager has the ability to track your website’s data like conversions, remarketing and other analytics indicators.

How to start using Google Tag Manager

Before you connect Google Tag Manager to your Squarespace website, you’ll need to create a GTM account. To do it, you are free to use either Google Business or Gmail existing accounts. Simply log in to the Google Tag Manager using one of these accounts. Once you open the Google Tag Manager, you’ll see that it offers you a possibility to create multiple manager accounts. These GTM accounts can be created for a different purpose each. 

Here in this guide we’re going to observe how to place a Google Tag Manager container to your Squarespace site. Keep in mind that you’ll need to add it to the backend of your website.

Tip: A container is the code including all of the tags, triggers and variables that are present on your Squarespace site.

If you haven’t got a Google Tag Manager account yet, you’ll have to create a new one for further use on your Squarespace site. To do it, click the Create Account button in the top right corner of your page. 

Fill out all the required info like account name, location and your container name. Make sure that when choosing the target platform you’ve selected the Web since you created it and plan to add it to your Squarespace site. 

How to add Google Tag Manager to a Squarespace site

To add Google Tag Manager to your site, follow these steps:

  1. Login to your Squarespace site, go to Settings and click Advanced.
  2. Go to the Code Injection section.
  3. Find the header and the footer of your website on the left sidebar. 
  4. To add a Google Tag Manager container to your Squarespace site, copy and paste the header code from GTM into your website header box.
  5. Copy the body code from your Google Tag Manager into your website’s footer box. 
  6. Save the changes. 

Now you’ll need to test your container to make sure Google Tag Manager works fine on your site. Let’s see how you can do it. 

How to check if Google Tag Manager is working

You can check if GTM is up and running on your Squarespace site by means of Google Chrome extension called Tag Assistant. It's really helpful in testing and debugging the implemented software. And it can also be used to troubleshoot Google Ads, Analytics, and DoubleClick. 

To check if Google Tag manager works fine on your Squarespace site, install the extension and then follow these steps:

  1. Click the Tag Assistant icon that has appeared in your browser. 
  2. Enable the extension and refresh your browser.
  3. Look at the status of your Google Tag Manager container. If it’s colored yellow or red, there’s something wrong with adding or installing. By clicking on the icon, you’ll reveal what the problem is. 

After solving the problem, the icon will turn green. You can proceed to using the Google Tag Manager tool in your site.

There’s also another way to test if your GTM works on your Squarespace site. To do it, go to your Google Tag Manager account, navigate to Workspace, find the Preview button in the top right corner. After that, refresh your Squarespace site’s page and then you will see the Google Tag Manager preview on your website which means that the GTM container has been installed successfully. 

How to add Facebook pixel to Tag Manager

Adding Facebook pixel to your Google Tag Manager is a very helpful step if you need to use the pixel data to retarget your Squarespace website visitors showing them ads of products they’ve clicked on your site but did not buy for some reason. 

To add the pixel to Google Tag Manager, you’ll need to create your pixel first. You can see how you can do it in the guide “Facebook pixel on Squarespace”. After your pixel is created, follow these steps:

  1. Log in to your Google Tag Manager account.
  2. Select the container you need and click Add a new tag option.
  3. Click the Custom HTML tag and add a name for your tag. Try to use the name related to Facebook pixel so that you could easily find it in the future.
  4. Open the Events manager and click Add Events.
  5. Choose From a new website option and after that - Install code manually.
  6. Go back to the Tag Manager and put the code to the HTML container. 
  7. Find the Advanced settings dropdown and select Once per page under Tag firing options.
  8. Under the Fire On section, select All Pages option.
  9. Click Create Tag.

The next step of implementing Google Tag Manager with Facebook pixel is setting up standard events for your Squarespace site. The list of these events can be found here.

How to check if Facebook pixel integration with GTM works correctly

The most simple way to check if everything works fine on your Squarespace site is to use Google Chrome extension called Facebook Pixel Helper extension. It can easily demonstrate to you if the pixel is working and also troubleshoot different issues. If your pixel works fine, the extension icon will be blue and will show the number of active pixels on your site. 

Clicking on the extension will demonstrate a pop-up window that will demonstrate whether the pixel is working or not. If something goes wrong, the error message will be demonstrated. 

After your tag is created, you are free to use it to get helpful insights on your audience’s behavior. 

How to add Google Analytics using Google Tag Manager

With Google Tag Manager, you can deploy all sorts of tracking codes on your Squarespace site, without a need to edit your website’s code. Among these tracking codes is the Google Analytics tracking code allowing you to perform event tracking, conversion tracking and so much more.

To implement Google Analytics to Google Tag Manager, you’ll need to sign up to GTM if you haven’t already. After you’re done, you’ll get a tracking code snippet that you’ll need to add to your Squarespace site. When the code is entered, you’ll need to set up a new tag. Follow these steps to do it:

  1. Open your GTM account and click New tag.
  2. Rename the tag if needed and click on the big icon named “Choose a tag type to begin setup”.
  3. Select Google Analytics: Universal Analytics.
  4. Click the dropdown under Google Analytics Settings and select a New Variable.
  5. Give a name to your new Variable and enter your Google Analytics Tracking ID.
  6. Save your changes.

After you’ve Integrated your Google Analytics with your GTM on your Squarespace site, it’s time to set up a trigger. To do it, click on the Choose a trigger to make this tag fire option. If you need basic Google Analytics implementation on your Squarespace site, you’ll need to choose All Pages. After that, you’ll need to submit your newly created tag. This can be done by selecting Tags from the options from the left sidebar. When you’re finished, select the Google Analytics tag and click the Submit button. The implementation of Google Analytics with GTM on your Squarespace site is over.

How to add AdSense code via Tag Manager

If you need to use Google AdSense on your Squarespace website, there’s also a way to do it via GTM. And to do it, you’ll have to run the universal ad code first and after that begin marking out your ad placements. 

To implement AdSense with Google Tag manager on your Squarespace site, follow these steps:

  1. Go to your AdSense account and click Content under My Ads section.
  2. Click on Auto Ads and select the type of ads you need to display. Now you’ll get your universal code.
  3. Open your Google Tag Manager account and create a new tag. Give it a name. 
  4. Choose custom HTML as the tag template. 
  5. Paste the code into the text field. Set the trigger to fire on All pages or only on the pages you need to serve ads on.
  6. Save your changes and click Submit to set the ode live.
  7. To create the ad code, go back to your AdSense account. 
  8. Click the Content option under My ads. 
  9. Find Ads units and click this option to create a new ad unit.
  10. Provide your new ad unit with a name and then click Get the code. 
  11. Copy your specific ad code. 
  12. To add your ad placement code, go to your GTM account. 
  13. Find the Variables option and click it, create a new Variable and call it asClientID.
  14. Configure the Variable as constant. Enter your AdSense Client ID as the value.
  15. Click on tags on the left sidebar of your GTM account and create a new tag. Name it IE Adsense.
  16. Choose the Custom HTML tag template and use the code taken from here
  17. Paste this code into your GTM.
  18. Choose the All Pageviews trigger.

After you’re done, you’ll have to test your changes in the preview mode. Once you make sure everything’s working correctly, you are free to push your changes live. 

It’s highly recommended that you test your changes. To do it, install Google Publisher Plugin to your Google Chrome browser and connect it both to your Google Analytics and AdSense accounts that you’ve created for your Squarespace site. By means of this tool you’ll be able to debug all ad placements and give info about your website’s ad performance.