How can we help?

Install Tracking Code On a Shopify Website

01/06/2025

How to Install ClickSambo on a Shopify Website

To ensure your Shopify store is fully protected, you must install ClickSambo tracking codes across your entire site.

Because Shopify separates the main storefront from the secure checkout, this is a two-part process:

Storefront Protection: Adding code to your theme files (covers Home, Product, and Collection pages).

Checkout Protection: Adding code to your settings (covers the Order Status/Thank You page).

Get Your Tracking Codes

First, retrieve your unique code snippets.

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 Codes to Your Main Theme (theme.liquid)

This step activates tracking on your homepage, product pages, and general site content.

Create a Backup (Highly Recommended):

From your Shopify Admin, go to Online Store > Themes.

On your current live theme, click the three dots (...) menu and select Duplicate. This creates a safety backup before you edit any code.

Open the Code Editor:

Once the backup is complete, click the three dots (...) menu on your main theme again and select Edit code.

Locate the File:

In the file browser on the left, look under the Layout folder.

Click on theme.liquid to open the file.

Install the HEAD Code:

Find the closing </head> tag.

On a new line just before it, paste your Tracking Code (HEAD Section).

Install the BODY Code:

Find the opening <body> tag.

On a new line immediately after it, paste your NoScript Tracking Code (BODY Section).

Click Save.

Add Codes to Your Checkout Pages

Shopify's checkout is secure and does not use the theme.liquid file.

You must add the codes manually in the settings to protect the final step of the purchase.

From your Shopify Admin, go to Settings (bottom left corner) > Checkout.

Scroll all the way down to the Order status page section.

Locate the text box labeled Additional scripts.

Paste BOTH codes into this box:

Paste the Tracking Code (HEAD Section) first.

Paste the NoScript Tracking Code (BODY Section) directly below it.

Click Save.

Verify the Installation

To ensure protection is active, you must verify both the storefront and the checkout.

Verify the Storefront

Open your live store in a new Incognito/Private browser window.

Right-click on the homepage or a product page and select View Page Source.

Search (Ctrl+F/Cmd+F):

Find cdn.clicksambo.com inside the <head> section.

Find ping.clicksambo.com inside the <body> section.

Verify the Checkout (Recommended)

Place a test order on your store to reach the "Thank You" / "Order Status" page.

On this final confirmation page, right-click and select View Page Source.

Confirm that both tracking codes are present in the source code.

Once verified on both the storefront and the order status page, your Shopify store is fully protected.

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.