API Implementation

Sovrn //Commerce offers an API that allows any application to use the Sovrn //Commerce service. However, all browser extensions/toolbars must be approved by Sovrn //Commerce in order to allow affiliation, and we may withhold payment for revenue generated if your extension/toolbar has not been approved.

Documentation for our API are located here: API documentation

Aliasing Sovrn //Commerce API Calls

You can mask the fact that you use Sovrn //Commerce's affiliation services by creating "alias" domains for VigLink's service-related hostnames, and making a slight modification to your VigLink JavaScript library initialization parameters. 

Any publisher can alias the API calls by creating a single CNAME and redirecting VigLink API calls to that name.

To create the appearance that a page on your website calls publisher-provided services instead of Sovrn //Commerce's service, use the following guidelines:

  • Create a DNS CNAME that points to api.viglink.com. We suggest using click.<publisherdomain>.com

  • Change the api_url parameter in the VigLink Javascript library initialization code on your pages to specify the alias domain name.

 An example altered initialization block is shown below:

 <script type="text/javascript">

  var vglnk = { api_url: '//click.mydomain.com/api',

                key: 'mypublisherkey' };

   (function(d, t) {

    var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;

    s.src = ('https:' == document.location.protocol ? vglnk.api_url :

             '//cdn.viglink.com/api') + '/vglnk.js';

    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);

  }(document, 'script'));

</script>  

A Note About SSL

These instructions apply primarily to non-SSL traffic. Aliasing SSL traffic is more complex because of the security protocols involved. VigLink does not currently support aliasing its hostnames for SSL (https) traffic. 

If your site supports SSL, the code snippet below will function—but viewers accessing the publisher site via SSL will see warnings in their browser.

 <script type="text/javascript">

  var vglnk = { api_url: '//click.mydomain.com/api',

                key: 'mypublisherkey' };

   (function(d, t) {

    var s = d.createElement(t); s.type = 'text/javascript'; s.async = true;

    s.src = ('https:' == document.location.protocol ? vglnk.api_url :

             '//clickcdn.mydomain.com/api') + '/vglnk.js';

    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);

  }(document, 'script'));

</script>

Have more questions? Submit a request

Comments

Powered by Zendesk