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.
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:
- Login to your Squarespace site, go to Settings and click Advanced.
- Go to the Code Injection section.
- Find the header and the footer of your website on the left sidebar.
- To add a Google Tag Manager container to your Squarespace site, copy and paste the header code from GTM into your website header box.
- Copy the body code from your Google Tag Manager into your website’s footer box.
- 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:
- Click the Tag Assistant icon that has appeared in your browser.
- Enable the extension and refresh your browser.
- 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:
- Log in to your Google Tag Manager account.
- Select the container you need and click Add a new tag option.
- 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.
- Open the Events manager and click Add Events.
- Choose From a new website option and after that - Install code manually.
- Go back to the Tag Manager and put the code to the HTML container.
- Find the Advanced settings dropdown and select Once per page under Tag firing options.
- Under the Fire On section, select All Pages option.
- 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:
- Open your GTM account and click New tag.
- Rename the tag if needed and click on the big icon named “Choose a tag type to begin setup”.
- Select Google Analytics: Universal Analytics.
- Click the dropdown under Google Analytics Settings and select a New Variable.
- Give a name to your new Variable and enter your Google Analytics Tracking ID.
- 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:
- Go to your AdSense account and click Content under My Ads section.
- Click on Auto Ads and select the type of ads you need to display. Now you’ll get your universal code.
- Open your Google Tag Manager account and create a new tag. Give it a name.
- Choose custom HTML as the tag template.
- 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.
- Save your changes and click Submit to set the ode live.
- To create the ad code, go back to your AdSense account.
- Click the Content option under My ads.
- Find Ads units and click this option to create a new ad unit.
- Provide your new ad unit with a name and then click Get the code.
- Copy your specific ad code.
- To add your ad placement code, go to your GTM account.
- Find the Variables option and click it, create a new Variable and call it asClientID.
- Configure the Variable as constant. Enter your AdSense Client ID as the value.
- Click on tags on the left sidebar of your GTM account and create a new tag. Name it IE Adsense.
- Choose the Custom HTML tag template and use the code taken from here.
- Paste this code into your GTM.
- 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.