---
title: Add the LeadSources code to your website
description: "To start using LeadSource, the first step is to add our code to the head tag of your website. You need to add the code to all the pages of your website. We will guide you through this process. ##…"
url: "https://help.leadsources.io/docs/add-leadsources-code/"
updated: "2025-07-19"
category: Add Leadsources code
---

# Add the LeadSources code to your website

To start using LeadSource, the first step is to add our code to the head tag of your website. You need to add the code to all the pages of your website. We will guide you through this process.

## Step 1: Find and copy the LeadSources code

[How to copy your Leadsources tracking code](https://www.youtube.com/embed/xSHbIy2a43s?feature=oembed)

1. Create an account on leadsources.io (free 14 Days trial)
2. Log in to leadsources.io from the [login page](https://app.leadsources.io/?menu=login)
3. Make sure you are under the tab "Setup Tracking" on the top left
4. Copy our code that you will find under "Step 1"

![](https://leadsources.io/wp-content/uploads/2024/06/Install-leadsource-script-in-header-1024x460.webp)

## Step 2: Insert the LeadSources code into the head tag of your website

### Option 1: Insert the code manually

Now integrate this code into the head tag of your website.

The steps depend on the site builder you are using. We have created a custom guide for the most popular site builders. Find yours from the list below:

- [Carrd](https://help.leadsources.io/docs/add-leadsources-code-carrd/)
- [ClickFunnels](https://help.leadsources.io/docs/add-leadsources-code-clickfunnels/)
- [Drupal](https://help.leadsources.io/docs/add-leadsources-code-drupal/)
- [Duda](https://help.leadsources.io/docs/add-leadsources-code-duda/)
- [GoHighLevel](https://help.leadsources.io/docs/add-leadsources-code-gohighlevel/)
- [Google Tag Management](https://help.leadsources.io/docs/add-leadsources-code-google-tag-manager/)
- [Hostinger](https://help.leadsources.io/docs/add-leadsources-code-hostinger/)
- [Instapage](https://help.leadsources.io/docs/add-leadsources-code-instapage/)
- [Squarespace](https://help.leadsources.io/docs/add-leadsources-code-squarespace/)
- [Swipe Pages](https://help.leadsources.io/docs/add-leadsources-code-swipe-pages/)
- [Unbounce](https://help.leadsources.io/docs/add-leadsources-code-unbounce/)
- [Webflow](https://help.leadsources.io/docs/add-leadsources-code-webflow/)
- [Wix](https://help.leadsources.io/docs/add-leadsources-code-wix/)
- [WordPress](https://help.leadsources.io/docs/add-leadsources-code-wordpress/)

### Option 2: Insert the code using Google Tag Manager

**Log in to Google Tag Manager** and open your container.

**Create a New Tag**:

- Go to **Tags** > **New**.
- Click **Tag Configuration** > select **Custom HTML**.
- Paste your LeadSources tracking script.

**Adjust Tag Settings**:

- Click **Advanced Settings**.
- Set **Tag firing priority** to a high number (e.g. `9999`).

**Set Trigger**:

- Click **Triggering**.
- Choose **All Pages**.

**Save and Publish**:

- Click **Save**.
- Click **Submit** to publish the changes.

## Step 3: Test the code installation

To verify that the LeadSources code has been properly implemented in your website, follow these simple steps:

Go to any page on your website. Right-click, then click on “Inspect.

![](http://help.leadsources.io/wp-content/uploads/2024/07/Inspection.png)

The source code window appears. From there, perform a search:

- On PC: Ctrl+F
- On Mac: Command-spacebar

Search for the term “leadsources”. If the LeadSources code is appearing, you have implemented the code properly.

![](http://help.leadsources.io/wp-content/uploads/2024/07/Find-leadsources-script-1024x424.webp)

## Step 3: Troubleshoot

If you can't track the source of your leads:

1. Make sure you have deployed the changes you've done on your website by emptying the cache of your website.
2. Make sure you have emptied the cache of your browser: it might be that you are viewing an cached version of your website, without our tracking script on it.
3. If you use a performance optimization tool (like NitroPack), it may modify the script for optimization purposes. Exclude the script from NitroPack optimization.
