Building Affiliate Links

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%2Fproduct123

In 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:

ParameterTypeDescription
keystringYour Commerce API key, found in your Site Settings. *Required
ustringThe destination URL to monetize. Must be fully URL-encoded. *Required

Optional: Tracking Parameters

You can include additional parameters to improve tracking and reporting:

ParameterTypeDescription
cuidstringAn identifier of your choosing used to associate the click with a user, page, campaign, or event. Maximum 2048 alphanumeric characters.
utm_sourcestringIdentifies the source of the traffic (e.g. website, newsletter, twitter).
utm_mediumstringIdentifies the marketing medium (e.g. email, social, banner).
utm_campaignstringIdentifies the campaign name, promotion, or initiative (e.g. black_friday_2025).
utm_termstringIdentifies paid search keywords or targeting terms.
utm_contentstringDifferentiates 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.

ParameterTypeDescription
bfdoubleMinimum bid floor required for Commerce to affiliate the click.
fbustringFallback 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