> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landerlab.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Custom Code to Landing Pages

> Add custom code to landing pages to integrate tracking scripts, analytics tools, and third-party widgets for enhanced functionality.

The **Custom Code** section allows you to add custom JavaScript to your landing page. This is useful when integrating external tools such as **tracking scripts, analytics platforms, or third-party widgets**.

You can add scripts that run either in the **page header** or **before the closing body tag**, depending on how the script needs to load.

## Where Custom Code Can Be Added

Inside the **Custom Code** settings you will find two script placement areas:

| Location            | Description                                                                                                                                                              |
| :------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Inside**`<head>`  | Scripts placed here load early when the page loads. This is commonly used for analytics tools, tracking pixels, or scripts that must initialize before the page renders. |
| **Before**`</body>` | Scripts placed here load after the page content. This is ideal for trackers, widgets, and scripts that should run after the page has finished loading.                   |

## How to Add Custom Code

Follow the steps below to add custom JavaScript to your landing page.

### 1. Open your landing page

Go to **Landing Pages** and click the **name of the landing page** you want to edit.

### 2. Open the Settings panel

Click the **Settings** tab on the landing page overview screen.

### 3. Go to Custom Code

From the settings menu on the left side, select **Custom Code**.

### 4. Add your script

Paste your JavaScript code into one of the available fields:

* **Custom Code inside** `<head>`
* **Custom Code before** `</body>`

Make sure your code includes the proper `<script></script>` **tags**.

### 5. Save your changes

Click **Save Settings** to apply the custom code.

<Frame>
  <img src="https://mintcdn.com/landerlab-babdc23f/6roxMzHWpj6L8WU9/images/Group34.png?fit=max&auto=format&n=6roxMzHWpj6L8WU9&q=85&s=fd8125f462e0c1c5ccbacc353fb86f6e" alt="Group34" width="1691" height="934" data-path="images/Group34.png" />
</Frame>

## When to Use Custom Code

Custom code is commonly used for:

* **Click tracking scripts**
* **Analytics tools (Google Analytics, etc.)**
* **Third-party widgets**
* **Conversion tracking scripts**
* **Custom JavaScript functionality**

<Tip>
  **Tip:** If you're adding **tracker scripts (like ClickFlare or Voluum)**, they are usually placed **before the closing** `</body>` **tag**, so they load after the page content.
</Tip>
