This guide provides step-by-step instructions on how to install both the ClickSambo JavaScript code for the <head>
and the <noscript>
code for the <body>
using Google Tag Manager (GTM).
Log in to your Google Tag Manager Account:
Go to https://tagmanager.google.com/ to log in to your GTM account and select the relevant container.
Create a New Tag:
From the left menu, go to the Tags tab and click the New button.
Name the Tag:
Give your tag a name that is easy to recognize. For example: "Clicksambo - Head Script".
Tag Configuration:
Click on the "Tag Configuration" box and select Custom HTML as the tag type.
Paste the Script Code:
In the HTML field that opens, paste the entire script code you want to add between the <head>
tags. Your unique script code is like the example below.
<script src="https://cdn.clicksambo.com/scripts/YOUR-UNIQUE-UNIVERSAL-ID.js"></script>
Set the Trigger:
Click on the "Triggering" section and select the All Pages trigger. This ensures the code runs in the <head>
section of all your site's pages.
Save:
Save your tag by clicking the Save button in the top right corner.
Google recommends placing <noscript>
tags immediately after the opening <body>
tag for situations where JavaScript is disabled.
Create Another New Tag:
Go to the Tags section again and click the New button.
Name the Tag:
Give this tag a descriptive name as well. For example: "Clicksambo - Body Noscript".
Tag Configuration:
Again, select the Custom HTML tag type from the "Tag Configuration" area.
Paste the Noscript Code:
In the HTML field, paste the <noscript>
code you want to add between the <body>
tags. Your domain-specific noscript code is in the format below:
<noscript>
<img src="https://ping.clicksambo.com/clicksambo?uid=YOUR-UNIQUE-UNIVERSAL-ID"
width="1" height="1" style="display:none;">
</noscript>
Set the Trigger:
From the "Triggering" section, select the All Pages trigger again.
Save:
Save the tag by clicking the Save button.
Click the Submit button.
Enter a Version Name that describes the changes you made (e.g., "Added ClickSambo Codes").
Complete the process with the Publish option.
After completing these steps, the ClickSambo <head>
and <body>
codes will be successfully added to your website via Google Tag Manager.