The Tracking Code (HEAD Section) acts as the primary analysis engine, while the NoScript Tracking Code (BODY Section) serves as an essential fallback.
This guide covers four methods, from easiest to most advanced. For most users, the Plugin method is the safest and highly recommended.
Before you begin, copy both of your unique ClickSambo tracking codes from your dashboard.
Log in to your ClickSambo account.
Navigate to Account > Account Settings > Domain Tracking Setup.
Select your domain and copy both the Tracking Code (HEAD Section) and the NoScript Tracking Code (BODY Section).
Select one of the methods below to add the codes to your WordPress site.
In your WordPress Admin dashboard, go to Plugins > Add New.
Search for WPCode – Insert Headers and Footers. Install and Activate the plugin.
In the left-hand menu, navigate to Code Snippets > Header & Footer.
You will see two boxes:Paste your Tracking Code (HEAD Section) into the "Header" box.
Paste your NoScript Tracking Code (BODY Section) into the "Body" box.
Click Save Changes. The plugin will now correctly inject both codes into every page of your site.
In your WordPress Admin, go to Appearance > Customize.
Look for sections named "Theme Settings," "Custom Code," or "Scripts."
Find two separate fields for adding code to the HTML <head>
and <body>
.
Tracking Code (HEAD Section)
into the Header field.NoScript Tracking Code (BODY Section)
into the Body fieldPublish your changes. If your theme only provides a Header field, please use Method A instead.
Instead, follow our dedicated guide for the specific hybrid installation required.
Always use a Child Theme to prevent your changes from being erased when you update your main theme.
In WordPress Admin, go to Appearance > Theme File Editor.
From the dropdown on the right, make sure you select your Child Theme.
Find and click on the Theme Header (header.php) file to open it.
Carefully paste the Tracking Code (HEAD Section) just before the closing </head> tag.
Carefully paste the NoScript Tracking Code (BODY Section) just after the opening <body> tag.
Click Update File. Check your site immediately for any errors.
After adding the codes via any method, it is critical to clear your website's cache. Go to your caching plugin's settings (e.g., LiteSpeed Cache, WP Rocket, W3 Total Cache) and purge all caches. If you use a CDN like Cloudflare, clear its cache as well.
Open any page of your live website in a new incognito browser window.
Right-click the page and select "View Page Source".
Confirm the HEAD code: Search (Ctrl+F) for cdn.clicksambo.com. You should find your script inside the <head> section.
Confirm the BODY code: Search again for ping.clicksambo.com. You should find your <noscript> code immediately after the opening <body> tag.