How can we help?

Installing ClickSambo Tracking Code on Magento 2

01/06/2025

How to Install ClickSambo on a Magento 2 Website

To fully protect your Magento 2 store and enable click fraud protection, you must install both ClickSambo tracking codes across your entire website.

Tracking Code (HEAD Section): Your primary script for real-time analysis.

NoScript Tracking Code (BODY Section): Your essential fallback for 100% coverage.

This is done by adding the codes to two separate sections within your theme's configuration panel.

⚠️ Important After completing the installation steps, you must clear your Magento cache. If you skip this, the tracking codes will not appear on your live store.

Get Your Tracking Codes

First, retrieve your unique code snippets from your dashboard.

Log in to your ClickSambo account.

Navigate to Account > Account Settings > Domain Tracking Setup.

Select your domain.

Keep this tab open or copy both the Tracking Code (HEAD Section) and the NoScript Tracking Code (BODY Section) to a text file.

Add Both Codes in Magento 2 Configuration

You will now add each code to its correct location in your store’s design configuration.

Log in to your Magento 2 Admin Panel.

On the left-hand menu, navigate to Content > Design > Configuration.

A grid will appear showing your store views. Find the theme/store view currently active and click Edit in the "Action" column.

Part A: Install the HEAD Code

Scroll down and expand the HTML Head section.

Find the text box labeled Scripts and Style Sheets.

Paste your Tracking Code (HEAD Section) into this box.

Part B: Install the BODY Code

Scroll down further and expand the Footer section.

Find the text box labeled Miscellaneous HTML.

Paste your NoScript Tracking Code (BODY Section) into this box.

Note: Magento places content in "Miscellaneous HTML" just before the closing </body> tag, which is the correct placement for this code.

Click the Save Configuration button at the top right of the page.

Clear Your Magento Cache

This step is mandatory. Your changes will not apply until the cache is refreshed.

Navigate to System > Tools > Cache Management

A notification box may appear at the top. Click the orange Flush Magento Cache button.

Wait for the success message to confirm the cache has been cleaned.

Verify the Installation

Once the cache is flushed, verify the protection on your live site.

Open any page of your live website in a new Incognito/Private browser window.

Right-click anywhere on the page and select View Page Source.

Confirm the HEAD code:

Press Ctrl+F (Windows) or Cmd+F (Mac) and search for: cdn.clicksambo.com

You should find this script inside the <head> section.

Confirm the BODY code:

Search for: ping.clicksambo.com

You should find this <noscript> snippet near the bottom of the page, inside the footer area.

Once you have confirmed both codes are present, your Magento 2 store is fully protected by ClickSambo.

Whatsapp Sohbet
Customise Consent Preferences
Cookies
Cookies Other
Always Active

Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet.

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 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

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.