It is important to understand that the Google Tag is separate from the ClickSambo tracking code.
ClickSambo's Code: This is your security guard. Its purpose is to monitor your website traffic and block click fraud.
Google's Tag (gtag.js
): This is your business analyst. Its purpose is to send data to Google Analytics (for visitor stats) and Google Ads (for conversion tracking and remarketing).
If you use Google's advertising or analytics services, you will need to have both the ClickSambo codes and the Google Tag installed on your website.
Log in to your Google Analytics 4 or Google Ads account.
Find the installation instructions for your tag.
In Google Analytics 4, this is typically under Admin > Data Streams > Select your stream > View tag instructions.
In Google Ads, it's often under Goals > Conversions > Select a conversion action > Tag setup > Install manually.
Copy the entire JavaScript gtag.js
snippet provided by Google. It will look similar to this, with your unique TAG_ID
:
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>HTML<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
Edit your website's main theme or header template file.
Paste the copied gtag.js
snippet into the <head>
section of your website's HTML, ideally just after the opening <head>
tag.
Save the changes to your template and publish your website.
Check Real-time Reports: Log in to your Google Analytics account and look at the "Realtime" report. Visit your website in a separate tab, and you should see your visit register within a few moments.
Use Google Tag Assistant: Use Google's free "Tag Assistant Companion" Chrome extension to verify that your Google Tag is found and firing correctly on the page.
Are you using Google Tag Manager (GTM)?
If you already use GTM, do not follow this guide. You should deploy Google tags (like the GA4 Configuration tag) from within the GTM interface instead of adding gtag.js directly to your site's code.
Always Refer to Google's Official Guides
Google frequently updates its products. For the most accurate and up-to-date instructions, always consult the official documentation for Google Analytics 4 or Google Ads.
Platform-Specific Instructions
The method for adding code to your site's <head> section varies depending on your website platform (e.g., WordPress, Shopify, Wix). Please consult your platform's specific help guides for detailed instructions.