> For the complete documentation index, see [llms.txt](https://docs.chainvine.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chainvine.xyz/developers/sdk/classes-and-functions/utility-methods.md).

# Utility Methods

## storeReferrer

<pre class="language-typescript"><code class="lang-typescript">import { storeReferrer } from '@chainvine/sdk';

storeReferrer(); //This will fetch the "r" query parameter from the current URL (if available) and store it in a CV_REF cookie

<strong>//You may customise the cookie settings as follows:
</strong>
storeReferrer({
  durationDays: 30, //Override the default cookie duration (120 days)
  referrer: 'ABC123', //Should you already have access to the referrer, and if you do not want it fetched from the URL, you can provide it directly
}); 
</code></pre>

## getReferrer

```typescript
import { getReferrer } from '@chainvine/sdk';

//Fetches a previously stored referrer from the CV_REF cookie if available, returns undefined if not
getReferrer(); 
```

## clearReferrer

```typescript
import { clearReferrer } from '@chainvine/sdk';

//Clear the CV_REF cookie:
clearReferrer();
```
