How can we help?

Installing ClickSambo Tracking Code on Magento 2 Website

01/06/2025

How to Install ClickSambo on a Magento 2 Website

Install theTo fully protect your Magento 2 store, you must install both ClickSambo tracking codes across your entire website. ClickSambo tracking code on your Magento 2 store to enable click fraud protection for your ads.

This is done by adding the codes to two separate sections within your theme's configuration in the Magento Admin Panel.

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

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

Important: After completing these steps, you must clear your Magento cache for the changes to appear on your live store.

Step 1: Get Your Tracking Codes

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

Step 2: 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 you are currently using and click Edit in the "Action" column.

On the configuration page, you will add the two codes in two different sections:

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

  • Now, 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: This field correctly places the code before the closing </body> tag).

After pasting both codes, click the Save Configuration button at the top right of the page.

Step 3: Clear Your Magento Cache

This step is mandatory for your changes to go live.

Navigate to System > Tools > Cache Management.

A yellow notification box will likely appear at the top of the page. Click the Flush Magento Cache button.

Ensure all cache types are green and valid.

Step 4: Verify the Installation

Open any page of your live website in a new incognito browser window.

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

Confirm the HEAD code: Search the code (Ctrl+F or Cmd+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 snippet located towards the end of the page, before the closing </body> tag.

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

Did this answer your question?
Customise Consent Preferences
Cookies

CookieConsentIntro

CookieConsentNecessary

CookieConsentThirdParty

CookieConsentChoice

Show More
Cookies Necessary
Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Cookies Functional

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

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

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

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 Uncategorised

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