How can we help?

Domain Tracking Setup

01/06/2025

Getting Started: ClickSambo Domain Tracking

To ensure ClickSambo can accurately monitor your traffic and protect your ads, you need to complete a three-part setup.

This guide will walk you through adding two codes to your website and configuring your ad platform's tracking template.

Step 1: Install the Primary JavaScript Code

This is the most critical step. The primary JavaScript code enables ClickSambo's real-time analysis, fraud detection, and detailed visitor journey tracking.

For the best performance, you should place this script in a specific location on your website.

For the best performance, you should place this script in a specific location on your website.

How to Find Your Code

Log in to your ClickSambo dashboard.

Navigate to Account Settings > Domain Tracking Setup.

Click Details next to your domain plan to find your unique script.

Where to Place the Code

The best practice is to place the script as high as possible in the <head> section of your website. This ensures it loads first and begins monitoring immediately, providing the most accurate data.

Recommended Placement: Paste the code right after the opening <head> tag. If you use a single template or header file for your website, adding it there once is enough.

HTML Example:

<head>
    <script async src="https://cdn.clicksambo.com/scripts/your-unique-id.js"></script>
    <meta charset="utf-8">
    <title>My Website</title>
    <link href="styles.css" rel="stylesheet">
</head>

What's Next?

After you've added the code and a visitor lands on your site, ClickSambo will automatically detect the script. You'll see a "Connected" status in your dashboard. 

Example: Installing the Primary JavaScript Code (<head>)

This guide provides a complete explanation of the main JavaScript tracking code and how to correctly install it in your website's <head> section for maximum performance.

What is the Primary Code and Why is it Important?

This is your primary ClickSambo Tracking Script and the most critical part of the installation. It is an advanced piece of JavaScript that activates the full power of our fraud detection and analytics platform.

Installing this code is essential for:

Real-Time Fraud Detection: Instantly identify and analyze suspicious clicks the moment they happen.

Advanced Bot Blocking: Detect and stop sophisticated bots that mimic human behavior.

User Journey Tracking: Get complete visibility into every visitor's path on your site after they click an ad.

Ad Click Verification: Connect advertising clicks directly to on-site activity for accurate attribution.

Installation: A Practical Example

The rule is simple: the JavaScript code should be the very first thing inside your website's <head> tag.

Before Installation

Here is a simplified example of a website's HTML before installation. The <head> section contains common elements like meta tags and the site title.

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>My Awesome Website</title>
    <link rel="stylesheet" href="css/styles.css">
    </head>

<body>
    ...
</body>
</html>

After Installation

To install the code, copy the snippet from your ClickSambo dashboard and paste it right after the opening <head> tag. All other head elements should now come after the ClickSambo script.

<!DOCTYPE html>
<html>
<head>
    <script async src="https://cdn.clicksambo.com/scripts/your-unique-id.js"></script>

    <meta charset="UTF-8">
    <title>My Awesome Website</title>
    <link rel="stylesheet" href="css/styles.css">
    </head>

<body>
    ...
</body>
</html>

Understanding the Code's Role

Placing this script at the very top of the <head> is crucial for its effectiveness. By loading first, it ensures:

Maximum Accuracy: It starts monitoring the moment a visitor arrives, capturing the most accurate data before other scripts or elements can interfere.

Optimal Performance: The async attribute in the script means it loads in the background without slowing down the rendering of your website's visible content.

Comprehensive Security: It provides the foundation for all of ClickSambo's advanced protection and analytics features.

Step 2: Add the NoScript Fallback Code

This simple code acts as a safety net, ensuring you still track visits from people who have JavaScript disabled in their browser.

While this is a small percentage of traffic, it's essential for getting a complete picture.

How to Find and Place the Code

You'll find the noscript code in the same location in your dashboard as your primary script. Copy it and paste it right after the opening <body> tag on every page of your website.

HTML Example:

<body>
    <noscript>
        <img src="https://ping.clicksambo.com/clicksambo?uid=your-unique-id" 
        width="1" height="1" style="display:none;">
    </noscript>

    <header class="main-header">
        <h1>Welcome Page</h1>
    </header>
</body>

Important: This is a fallback method only. It can track a basic page view but does not provide the advanced fraud detection or user journey analysis that the primary JavaScript code does. 

Example: Adding the Fallback Code (<body>)

This guide provides a complete explanation of the noscript fallback code and how to correctly install it on your website.

What is the Fallback Code and Why is it Important?

The noscript fallback code is a simple but essential tracking pixel that acts as a safety net. Its purpose is to track visitors who have JavaScript disabled in their browsers.

While most modern browsers and users have JavaScript enabled, a small segment of traffic does not. This can include:

Privacy-focused users who intentionally disable scripts.

Certain types of automated bots or scrapers that do not process JavaScript.

Installing this code ensures you get basic visibility into this otherwise invisible traffic, providing more complete data coverage. It is a vital supplement to the main JavaScript tracking code you place in the <head>.

Installation: A Practical Example

The rule is simple: the noscript code should be the very first thing inside your website's <body> tag.

Before Installation

Here is a simplified example of a typical website's HTML structure. Notice how the visible content, like a <head>, begins immediately after the <body> tag.

...
</head>

<body>
    <header class="main-header">
        <a href="/" class="logo">My Website</a>
        <nav>...</nav>
    </header>
    <main>
        <h1>Welcome Page</h1>
        <p>This is the content of my page.</p>
    </main>
    ...
</body>
</html>

After Installation

To install the code, copy the snippet from your ClickSambo dashboard and paste it right after the opening <body> tag. All of your other website content should come after it.

...
</head>

<body>
    <noscript>
        <img src="https://ping.clicksambo.com/clicksambo?uid=your-unique-id" 
             width="1" height="1" style="display:none;">
    </noscript>

    <header class="main-header">
        <a href="/" class="logo">My Website</a>
        <nav>...</nav>
    </header>
    <main>
        <h1>Welcome Page</h1>
        <p>This is the content of my page.</p>
    </main>
    ...
</body>
</html>

Understanding the Code's Role and Limitations

It is important to understand that this code is a fallback method.

  • What it does: It successfully logs a basic page view from a non-JavaScript source.
  • What it cannot do: It cannot perform the advanced, real-time fraud analysis, bot detection, or detailed user journey tracking that the primary JavaScript code (in the <head>) provides.

Think of it this way: the main JavaScript code is your high-tech, real-time security camera system, while the noscript code is a simple tripwire at the door. Both are essential for comprehensive security, but they serve different functions.

Step 3: Configure Your Ad Platform Tracking Template

This final step links your ad clicks to ClickSambo. The tracking template is a special URL structure that passes detailed information from your ad platform (like Google Ads) to your ClickSambo account.

How to Apply the Template

Find the tracking template URL in your ClickSambo dashboard.

Copy the URL to your clipboard.

Paste the template into the tracking field within your ad platform's account settings. For Google Ads, this is located under Account Settings > Tracking.

Note: If you have already integrated your Google Ads account with ClickSambo, this template may have been configured automatically.

Once all three steps are complete, your traffic will be accurately monitored and protected from invalid clicks.

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.