Intro
Add Google Analytics and Google Tag Manager to your site. It is best to do this right after spinning up a new site
Adding Scripts Automatically
From your Profile,
-
Click the gear icon to open the Site Settings.
-
Switch to the Google tab.
-
Add your Google Analytics (GA) or Google Tag Manager (GTM) ID.
This will bring up the site settings modal. Navigate to the Google tab where you have the option to add either tag
Once you have set up these tracking codes, The.com will automatically add the required scripts when you make a new page. It is recommended to do this as soon as possible. If you have already made pages and then add your tracking codes like above, your existing pages will not have the required scripts added automatically.
Adding Scripts Manually
Luckily, you are able to add GA and GTM tracking scripts manually with The.com's Script Element. Here are the steps:
Note: Everywhere in the scripts you see YOURCODE, you must change it to the custom code Google gives you aka:
-
Take this piece out: UA-YOURCODE-1
-
And replace it with your custom Tracking ID
Here is the process:
-
Go to your analytics company (in this case we'll use Google Analytics) and find your tracking scripts. They will look something like this:

You will notice there are two distinct scripts you'll need:
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-YOURCODE-1"></script>
<script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-YOURCODE-1');</script>
These are two different types of scripts and we'll need to put them into two Script elements in the head of your page.
Adding Script 1
-
Switch to the
<head>
of your page. -
Add a Script Element.
-
Paste the src value of the first script into Script's Source cell.
-
Open the Script's corner menu to edit its Attributes.
-
Click on the Async cell to toggle it from
Not Async
toAsync
.

It is also useful to rename the Script element. To do this, simply double click the Script element and type a new name, like "GA 1".
Adding Script 2
Next, we'll add the second script. Copy the contents inside the provided <script> tag.
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-Y
-
Create another Script Element below the one we just added.
-
Paste the code into the Script Element's Text cell.

Now you have added your Google Analytics tracking code!
Feel free to always hit "Command + K" in the software to ask for assistance!
Comments
0 comments
Please sign in to leave a comment.