---
updatedAt: 2025-03-20T20:38:41.000Z
agentTools:
  projectIndex: https://developer.sovrn.com/llms.txt
---

# Configuration with Javascript

The [HTML snippet](https://commerce.sovrn.com/install) provided for installation includes only basic configuration, like your API key. There are a handful of other options you can use to configure the Sovrn Commerce JavaScript library.

Most users will not need to use these options.

## **Options**

**key**\
Your Commerce API key, found on your [account page](https://commerce.sovrn.com/account). required; string

**api\_url**\
The base URL for API calls. If you’re using your own CNAME for api.viglink.com, be sure to set this option to "//\<your CNAME>/api".\
optional; string; default: "//api.viglink.com/api"

**cuid**\
If set, this value is included as the CUID when the library makes API calls on this page.\
optional; string

**enabled**\
Enable the library. When set to false, library initialization will be aborted immediately and no API calls will occur. When disabled, [JavaScript API](https://developer.sovrn.com/docs/javascript-api) methods will work in a failsafe mode, so the user experience is not affected.\
optional; boolean; default: true

**reaffiliate**\
By default, Commerce will not modify links which are already affiliated. To force re-affiliation for a single page, set reaffiliate to true. If you’d like to force re-affiliation globally, you can make that change in your [Commerce settings](https://commerce.sovrn.com/settings).\
optional; boolean; default: false

## **Example**

```javascript
var vglnk = {
key:  "88ac2a40e081e283ac504d1789d398ac",
cuid: "abc123"
}
```