This guide will walk you through adding two codes to your website and configuring your ad platform's tracking template.
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.
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.
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>
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.
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.
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.
The rule is simple: the JavaScript code should be the very first thing inside your website's <head>
tag.
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>
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>
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.
While this is a small percentage of traffic, it's essential for getting a complete picture.
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.
This guide provides a complete explanation of the noscript
fallback code and how to correctly install it on your website.
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>
.
The rule is simple: the noscript
code should be the very first thing inside your website's <body>
tag.
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>
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>
It is important to understand that this code is a fallback method.
<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.
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.