How can we help?

How to Install ClickSambo with Google Tag Manager (GTM)

01/06/2025

You can use Google Tag Manager (GTM) to easily deploy and manage your primary ClickSambo tracking script.

However, to ensure our fallback NoScript code works correctly, we will use a hybrid approach.

This guide will walk you through:

Installing the main Tracking Code (HEAD Section) using GTM.

Installing the NoScript Tracking Code (BODY Section) directly on your site (Recommended for 100% reliability).

Publishing and verifying the setup.

Prerequisites:

An active Google Tag Manager container installed on your website.

Access to your GTM container with "Publish" permissions.

Step 1: Get Your Tracking Codes

Before you begin, copy both of your unique ClickSambo tracking codes.

  1. Log in to your ClickSambo account.
  2. Navigate to Account > Account Settings > Domain Tracking Setup.
  3. Select your domain and copy both the Tracking Code (HEAD Section) and the NoScript Tracking Code (BODY Section).

Part 1: Install the Main Tracking Code via GTM

Let's add the primary JavaScript code using GTM.

Step 2: Create a New Tag in GTM

In your GTM container, go to Tags > New

Name your tag clearly (e.g., ClickSambo - Main Tracking (HEAD)).

Click Tag Configuration and choose Custom HTML as the tag type.

Paste your Tracking Code (HEAD Section) (the one starting with <script>...) into the HTML field.

Step 3: Configure the Trigger

Below the Tag Configuration, click Triggering.

Select the Initialization - All Pages trigger. This is the recommended trigger because it ensures our fraud detection script loads as early as possible on every page.

Click Save.

Part 2: Install the NoScript Fallback Code Directly

GTM cannot reliably deploy code for users who have JavaScript disabled.

To ensure your NoScript "safety net" code always works (especially against bots that disable JS), it must be added directly to your website's template.

Step 4: Add the NoScript Code to Your Website

Take the NoScript Tracking Code (BODY Section) that you copied in Step 1.

Edit your website's main theme or header template file.

Paste the NoScript code immediately after the opening <body> tag.

This ensures the fallback code is present on every page, regardless of a user's browser settings.

Part 3: Publish and Verify

Step 5: Publish Your GTM Container

  1. In your main GTM workspace, click Submit.
  2. Add a version name if you wish (e.g., "Installed ClickSambo Tracking") and click Publish.

Step 6: Verify the Installation

You must now verify that both codes are loading correctly.

Verify the GTM Tag:Use GTM's Preview mode. Navigate your website and confirm that your ClickSambo - Main Tracking (HEAD) tag "Fires" on each page you visit.
Verify the NoScript Code:Open your live website in a new incognito window.
Right-click and select "View Page Source".
Search (Ctrl+F) for ping.clicksambo.com. You must find the <noscript> code snippet located just after the opening <body> tag.

Once you have confirmed that the GTM tag fires and the NoScript code is visible in your page source, your installation is complete and your site is fully protected.

Did this answer your question?
Customise Consent Preferences
Cookies

CookieConsentIntro

CookieConsentNecessary

CookieConsentThirdParty

CookieConsentChoice

Show More
Cookies Necessary
Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Cookies Functional

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Cookies Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Cookies Performance

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Cookies Advertisement

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

Cookies Uncategorised

Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet.