Each code has a distinct role, and its placement is critical for optimal performance.
Tracking Code (HEAD Section): This is your primary detection engine. Placing it in the <head>
ensures it loads as early as possible to analyze visitor behavior and detect real-time threats.
NoScript Tracking Code (BODY Section): This is your essential safety net. Placing it at the beginning of the <body>
guarantees tracking coverage even if a user has JavaScript disabled—a common tactic used by bots.
Tracking Code (HEAD Section)
Where: Inside the <head>...</head> section of your website's HTML.
Best Practice: Place it just before the closing </head> tag.
NoScript Tracking Code (BODY Section)
Where: Inside the <body>...</body> section of your website's HTML.
Best Practice: Place it immediately after the opening <body> tag.
Recommended Method: Use your website platform's built-in tool for adding custom code. Platforms like Wix, Squarespace, and BigCommerce have dedicated features (e.g., "Custom Code," "Code Injection") that are the safest and easiest way to install the codes in the correct locations.
Alternative Method (Theme Editing): If your platform does not have a code injection tool, you will need to edit your site's main template file. This is common for platforms like WordPress and Shopify. You would add the codes to a file that controls your site-wide header (e.g., header.php or theme.liquid).
For detailed, step-by-step instructions for your specific platform, please see our dedicated guides: How to Install ClickSambo with Google Tag Manager (GTM)
Clear All Caches: This is a mandatory step. You must clear all website, server, or CDN (e.g., Cloudflare) caches for your changes to appear on the live site.
Verify Installation: Open your live website in an incognito window and "View Page Source". Confirm that the HEAD
code appears in the <head>
section and the BODY
code appears right after the opening <body>
tag.