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

# Web Signup Flow

> Learn how to capture referral codes on your website

When users click referral links, they land on your website first. Capture the referral code (`ucc`) on this landing page to properly attribute future conversions.

Follow these steps to set up referral code capture:

## Step 1: Set up your landing page

Create a landing page for referral traffic. Choose one approach:

* Dedicated referral landing page
* Home page with Cello New User Banner

See the [landing page optimization guide](https://docs.cello.so/guides/user-experience/optimizing-landing-pages.md) for best practices.

## Step 2: Install attribution script

The attribution script detects the `ucc` query parameter and stores it as a first-party cookie for later attribution of conversion events.

Install the Cello attribution script - [Attribution JS](https://docs.cello.so/sdk/client-side/attribution-js-introduction.md) -  using one of these methods:

> [card] [Embedded Script Tag](https://docs.cello.so/sdk/client-side/embedded-script-tag.md)

> [card] [Google Tag Manager](https://docs.cello.so/sdk/client-side/google-tag-manager.md)

The attribution script also enables you to:

* Fetch referrer names for [landing page personalization](https://docs.cello.so/guides/user-experience/personalizing-referrals.md)
* Get campaign parameters to [display discounts](https://docs.cello.so/guides/user-experience/new-user-discounts.md)
* Attach `ucc` to signup forms

See the [Attribution JS reference](https://docs.cello.so/sdk/client-side/attribution-js-introduction.md) for complete details.

## Step 3: Verify installation

Verify that the `ucc` is available on your signup page:

1. Test your website with these query parameters:
   ```html theme={null}
   https://yourwebsite.com/?productId=test&ucc=test
   ```

2. Verify these values are saved as cookies: `cello-product-id` and `cello-referral`

3. On your signup page, test `ucc` access from the browser console:

   ```javascript theme={null}
   window.CelloAttribution('getUcc')
   ```

   Expected response:

   ```javascript theme={null}
   Promise {<fulfilled>: 'test'}
   ```

If this test passes, the script is installed correctly.

> [!TIP]
>
> **Using referral codes at signup**
>
> Use `getUcc()` during user signup to retrieve the referral code, then pass it in the [signup event](https://docs.cello.so/attribution/tracking-signups.md) to Cello.
>
> For complex flows, save the `ucc` with your user record so it's available when sending [signup events](https://docs.cello.so/attribution/tracking-signups.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.