How to create Sovrn affiliate Links by wrapping destination URLs
Summary
You can create affiliate links by wrapping destination URLs. When a user clicks one of these links, Commerce affiliates and monetizes the click before redirecting the user to the final destination. This is intended for programmatic link creation and custom integrations.
If you only need to generate individual links or want shortened links, refer to our guide Create Links in Commerce.
Basic Example
https://sovrn.co?key=YOUR_API_KEY&u=https%3A%2F%2Fwww.retailer.com%2Fproduct123In this example, when a user clicks the generated link, Commerce affiliates and monetizes the click, and the user is redirected to the original destination URL with the required affiliate parameters added for attribution.
Required Parameters
At a minimum, every affiliate link must include the following parameters:
| Parameter | Type | Description |
|---|---|---|
| key | string | Your Commerce API key, found in your Site Settings. *Required |
| u | string | The destination URL to monetize. Must be fully URL-encoded. *Required |
Optional: Tracking Parameters
You can include additional parameters to improve tracking and reporting:
| Parameter | Type | Description |
|---|---|---|
| cuid | string | An identifier of your choosing used to associate the click with a user, page, campaign, or event. Maximum 2048 alphanumeric characters. |
| utm_source | string | Identifies the source of the traffic (e.g. website, newsletter, twitter). |
| utm_medium | string | Identifies the marketing medium (e.g. email, social, banner). |
| utm_campaign | string | Identifies the campaign name, promotion, or initiative (e.g. black_friday_2025). |
| utm_term | string | Identifies paid search keywords or targeting terms. |
| utm_content | string | Differentiates similar links or placements on the same page (e.g. header, footer). |
For details on how these parameters are returned in reporting, visit our Real-Time Reports Transactions guide.
Optional: Bid Floor and Fallback URL
Optionally set a bid floor and fallback URL. If Commerce cannot meet the specified bid floor for the original destination URL, the user is redirected to the fallback URL.
| Parameter | Type | Description |
|---|---|---|
| bf | double | Minimum bid floor required for Commerce to affiliate the click. |
| fbu | string | Fallback URL to use if Commerce cannot meet the specified bid floor. Must be URL-encoded. |
For more information, see Fallback URLs in Commerce.
Complete Example
https://sovrn.co?key=YOUR_API_KEY&u=https%3A%2F%2Fwww.retailer.com%2Fproduct123%3Futm_source%3Dnewsletter%26utm_campaign%3Dspring_sale&cuid=example_click_123&bf=0.10&fbu=https%3A%2F%2Fwww.backupstore.com%2Fproduct123
