# Install on Leadpages

Canonical: https://sourcetag.io/docs/install-leadpages

Add SourceTag's tracking script to your Leadpages landing pages using the head tracking code settings. Track which campaigns and sources drive your landing page conversions.

## Step 1: Copy your script tag

In your SourceTag dashboard, go to your site's detail page and copy the script tag. It looks like:

```html
<script src="https://cdn.sourcetag.io/scripts/YOUR_SITE_ID/st.js"></script>
```

## Step 2: Add to Leadpages

### For a single page

1. Open your landing page in the Leadpages builder
2. Go to the page's **Settings**
3. Find the **Analytics** or **Head Tracking Code** section
4. Paste the script tag into the head code area
5. Save

### For all pages (site-wide)

If you're using Leadpages as a full website (not just individual landing pages):

1. Go to your Leadpages site settings
2. Find the **Head Tracking Code** section
3. Paste the script tag
4. Save

This applies the script to every page on your Leadpages site.

## Step 3: Publish

Publish (or republish) your landing page. The tracking script is now active.

## Step 4: Test

Visit your landing page with UTM parameters:

```text
https://yourpage.leadpages.co/?utm_source=test&utm_medium=cpc&utm_campaign=leadpages-test
```

Submit the form on your landing page and check wherever your submissions are received. The submission should include hidden fields with attribution data.

## Notes

- The script works with Leadpages' built-in form elements. You'll need to add hidden fields to your forms yourself - SourceTag only populates fields that already exist. See [Add Hidden Fields](https://sourcetag.io/docs/fields-html) for the field names.
- If you're using Leadpages pop-ups or alert bars with forms, SourceTag will detect those too via MutationObserver.
- If you're connecting Leadpages to a CRM or email platform via Leadpages' integrations, the attribution hidden fields will be included in the submission data.
- Browser cookies are limited to 7 days on Leadpages (no server-side cookie option available for Leadpages currently).
