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 both ClickSambo tracking codes across your entire site

This includes your main storefront (homepage, product pages) and your checkout pages.

This is a two-part process:

Part 1: Add the codes to your main theme file (theme.liquid) for storefront protection.

Part 2: Add the codes to your checkout settings for order page protection.

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

This step adds tracking to your homepage, product pages, collection pages, and other standard store pages.

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

On your current theme, click the Actions button (three dots) and select Duplicate. This creates a backup of your theme, which is highly recommended before editing code.

Once duplicated, click Actions > Edit code on your main theme.

In the file browser on the left, under the Layout folder, click on theme.liquid to open it.

Find the closing </head> tag. On a new line just before it, paste your Tracking Code (HEAD Section).

Find the opening <body> tag. On a new line just after it, paste your NoScript Tracking Code (BODY Section).

Click Save.

Step 3: Add Codes to Your Checkout Pages

Shopify's checkout is separate from your main theme, so you must add the codes here as well to protect the final steps of a purchase.

From your Shopify Admin, go to Settings > Checkout.

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

Find the text box labeled Additional scripts.

Paste BOTH codes into this box. Paste the Tracking Code (HEAD Section) first, and then paste the NoScript Tracking Code (BODY Section) right below it.

Click Save.

Step 4: Verify the Installation

Now, confirm the codes are installed correctly across your entire site.

Verify the Storefront: Open your live store in a new incognito browser window. Visit your homepage and a product page.

Right-click and select "View Page Source".

Confirm the HEAD code (cdn.clicksambo.com) is in the <head> section and the BODY code (ping.clicksambo.com) is in 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 here as well.

Once you have verified the codes on both your storefront and your order status page, your Shopify 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.