> ## 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.

# Manage cookie consent

> To ensure compliance with privacy regulations, customers handle cookies and respond to user consent preferences with care and transparency. It is your responsibility to prompt website visitors to specify their preferred tracking level.

<Warning>
  Cookie consent is a complex legal subject, varying across different jurisdictions. While the Attribution Library offers tools for managing cookie consent, it is the responsibility of your organization to consult with legal experts to ensure compliance with specific regional laws and regulatory requirements.
</Warning>

# Understanding referral cookies

The [Attribution JS](/sdk/client-side/attribution-js-introduction) employs a specific first-party cookie to enable returning user to claim their referral discount. This cookie functions as a strictly necessary or essential cookie by default, but **should be configured based on your privacy guidelines**.

It's important to note that these cookies **do not directly monitor the identity of returning users.** Instead, it records the referral code, also known as the \[Unique campaign code (`ucc`), originating from the invitation link provided by a referrer and additional parameters to support returning users.

<Note>
  Cookies are not required to directly attribute referrals in Cello. They are used to assist in attributing a referral when a new user leaves and returns to the signup.
</Note>

## List of first-party referral cookies that are set

| Cookie               | Purpose                                                                                                                                                                                                  | Persistent or Session | Lifespan | Default type                                                      |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | -------- | ----------------------------------------------------------------- |
| cello-referral       | Cello uses `cello-referral` cookie to identify the referrer and campaign. These let us link the referrer and new users who sign up, and help us apply rewards and discounts based on the campaign terms. | Persistent            | 3 months | Strictly necessary or essential cookies                           |
| cello-productId      | Cello uses `cello-productId` cookie to identify the product (account) using Cello on this page.                                                                                                          | Persistent            | 3 months | Strictly necessary or essential cookies                           |
| cello-cookie-consent | Cello uses `cello-cookie-consent` cookie to store consent to managing cookies                                                                                                                            | Persistent            | 3 months | Strictly necessary or essential cookie for custom cookie handling |

# Methods for Handling Consent

The [Attribution JS](/sdk/client-side/attribution-js-introduction) provides several methods for handling user consent efficiently:

## 1. Custom Method

<Note>
  Custom method only works if your account has been configured to use custom cookie handling. Contact Cello Support to enable it.
</Note>

Utilize the [Attribution JS](/sdk/client-side/attribution-js-introduction) JavaScript API to dynamically inform it when a visitor has consented to cookie storage. This method offers full control over the timing of cookie storage, allowing you to align it with your user consent process.

### allowCookies

To allow the storage of the referral code cookie:

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

### deleteCookies

To halt the storage of the referral code cookie and clear it:

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

## 2. Consent System Method

For users of popular cookie management and consent platforms such as OneTrust, CookieBot, and Civic Cookie Control, the [Attribution Library](/cello/v2.0/docs/connect-attribution) offers built-in support for seamless integration. Our Cello support team can assist you in configuring the right tool for your specific needs, eliminating the need for coding.

### Supported Tools

* OneTrust <span className="badge-green">New</span>
* CookieFirst <span className="badge-blue">Coming Soon</span>
* CookieBot <span className="badge-blue">Coming Soon</span>
* Civic Cookie Control <span className="badge-blue">Coming Soon</span>

These methods allow you to handle cookie consent effectively when utilizing the [Attribution JS](/sdk/client-side/attribution-js-introduction) to track returning referees seamlessly.
