Skip to main content
Skip table of contents

CUIDs in Commerce

Our Platform dashboard provides a wealth of metrics, including revenue, clicks, sales, and page views. However, it doesn't currently offer a way to track specific members from your campaign, individual editor performance, products, links, or marketing campaigns.

If you need to identify a specific page or campaign containing an affiliate link, or track clicks from an affiliate link, Sovrn Commerce offers a solution: our product recognizes a specific parameter called “CUID” (Customer Identifier). By appending this parameter to the end of your affiliate links, you can track the CUID by running a report in the Platform or through our CUIDs API.

What does a CUID parameter require?

When utilizing a CUID parameter, keep the following requirements in mind:

  • The CUID itself can be up to 2048 alphanumeric characters long.

  • The CUID excludes special characters (!, ?, %, *, ., [, ], etc.).

  • For your own reference, we recommend keeping a record of the CUIDs you use.

Below, we'll discuss a few different methods for appending a CUID parameter to your affiliate links.

Create Links Method

If you’re utilizing the Create Links implementation method for generating affiliate links, you can easily add a CUID parameter. Publishers with social media platforms looking to track generated revenue from affiliate links on specific posts find success with this method!

  1. Visit the Create Links page in the Platform.

  2. Click on the blue +Create button in the top right corner.

  3. Here, you can create a new affiliate link and add a CUID parameter under the Tracking (Optional) section.

  4. Additionally, you can add a CUID parameter to an existing affiliate link.

    1. Click on the “Edit Link” (Pencil) icon under the Actions column to edit a given affiliate link.

    2. Add a CUID parameter under the Tracking (Optional) section.

  5. Under the “Custom tracking ID” field, you can input any alphanumeric string up to 2048 characters long to track your performance.

Note: Sometimes your tracking parameters may not appear in your redirect path. Don’t worry, we are still tracking them internally!

image (72).png

Manually Wrapping Links in Bulk

If you’re wanting to manually wrap your affiliate links in bulk, you can also also add a CUID parameter that way. Your links will be formatted like so:

http://redirect.viglink.com?key=[Your_API_KEY]&u=[URL]&cuid=[CUID]

Make sure to replace everything in the brackets, including the brackets themselves.

  • [Your_API_KEY] - You can find your API key on the Settings page in your Sovrn Commerce account. Look for the key icon in the row of the site where you are installing the link. 

  • [URL] - This is the URL you want to affiliate. You need to make sure to "HTML encode" the URL to ensure Sovrn Commerce works properly. You can easily encode URL's here. Just enter your URL and click "encode."

  • [CUID] - This is the alphanumeric string you can input as your CUID to track your performance.

We also have built this Google spreadsheet that you can use as a template to wrap your links in bulk. Please refer to the “Can I wrap links manually? How?” section from our Create Links in Commerce article for more details.

API Method

If you’re utilizing the API implementation method for generating affiliate links, we offer our Redirect API which enables you to programmatically generate affiliate links and add in CUID parameters as well. This method works well for publishers who have a mobile app/software and still want to track specific items or users.

An example of an affiliate link that includes a CUID parameter will look something like:

<https://redirect.viglink.com?u=https%3A%2F%2Fwww.macys.com%2Fshop%2Fproduct%2F%3FID%3D9792476&key=88ac2a40e081e283ac504d1789d398ac&cuid=12345abcde>

Please refer to the documentation for the Redirect API on our Developer Center for additional details.

Javascript Method

If you’re utilizing the Commerce JavaScript implementation method for generating affiliate links, you can easily add a CUID parameter as well. This works best if you're looking to apply a CUID to all affiliate links on your campaign or all affiliate links on specific pages of your campaign.

You can add a cuid: 'yourowncuid' field to your Sovrn Commerce JavaScript code, right after your API key. It should look something like this:

CODE
<script type="text/javascript">     
var vglnk = { key: 'yourapikey', cuid: 'yourowncuid'};     
(function(d, t) {         
  var s = d.createElement(t);             
  s.type = 'text/javascript';             
  s.async = true;             
  s.src = '//cdn.viglink.com/api/vglnk.js';         
  var r = d.getElementsByTagName(t)[0];             
  r.parentNode.insertBefore(s, r);     
}
(document, 'script')); 
</script>

Reporting on CUIDs

Now that you’ve done all this hard work in setting up your CUID parameters, you can pull reports on them in order to assess your performance and help you optimize your content. You can pull reports on your CUIDs in a couple of different ways.

Via the Sovrn Platform 

Please log into your account on the Sovrn Platform in order to pull a report on your CUIDs.

  1. Go to the Analytics tab and click on the blue Report button in the top right corner.

  2. Under the Performance reports section, Select the “Site” and the “Time frame” in which you’d like to generate a report.

  3. Below, check the “CUID/UTM report” box.

  4. Feel free to generate any reports at this time, if you’d like. Refer to our Reports in Commerce article for more detail.

  5. Once you’re all set, click on the blue Send button in the top right corner and your report will be emailed out to you within just a few minutes.

Via the CUIDs API

The CUIDs API is available from our Developer Center. This endpoint is used to query aggregated performance metrics by CUID. Specifically, you cansee individual CUID performance, your top performing CUIDs, actualized earnings, and more, all in real-time. Metrics include Revenue, Clicks, Sales, Actions, Conversion Rate and EPC.

Carefully follow the steps outlined in the documentation, and be sure to include your Secret Key for Authorization when you make the API call.

I still need help.

Questions? We are here to support you, contact Sovrn Support.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.