Configuration with Javascript

The HTML snippet 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.


Your Commerce API key, found on your account page. required; string

The base URL for API calls. If you’re using your own CNAME for, be sure to set this option to
optional; string; default:

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

Enable the library. When set to false, library initialization will be aborted immediately and no API calls will occur. When disabled, JavaScript API methods will work in a failsafe mode, so the user experience is not affected.
optional; boolean; default: true

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.
optional; boolean; default: false


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