Skip to content

Affiliate Attribution Overview

The purpose of affiliate attribution is to accurately track and assign rewards to affiliates for the customers or actions (such as sales, subscriptions, or downloads) they bring to a business. This process is essential in affiliate marketing as it enables businesses to:

  • Reward Affiliates Fairly
  • Measure Campaign Effectiveness
  • Optimize Marketing Spend
  • Enhance Transparency and Trust

For a full technical guide on how to implement advanced affiliate attribution, visit the Affiliate Attribution Setup Guide and share it with your tech team.

All referral links generetaed by affiliates on Affiliate Campaign Sign Up Page follow this simple format:

Terminal window
https://www.cryptowaves.app/landing?sc-ref-id=XXX&sc-cmp-id=YYY

Quick Steps

Follow this steps for basic affiliate attribution:

  1. Capture URL Parameters on Merchant’s Website
    On page load, retrieve sc-ref-id (referral ID) and sc-cmp-id (campaign ID) from the referral URL:

    const urlParams = new URLSearchParams(window.location.search);
    const referralId = urlParams.get('sc-ref-id');
    const campaignId = urlParams.get('sc-cmp-id');
  2. Store Parameters for Tracking
    Store these parameters using cookies, local storage or user’s DB record to maintain attribution across user sessions.

    document.cookie = `sc-ref-id=${referralId}; path=/; max-age=2592000`; // 30 days
    localStorage.setItem('sc-ref-id', referralId);
  3. Retrieve Values for Conversions
    When regestering a SoyCap.io conversion, retrieve the stored IDs to attribute actions to the correct affiliate and campaign.

    const referralId = document.cookie.match(/sc-ref-id=([^;]+)/)?.[1];
    const campaignId = localStorage.getItem('sc-cmp-id');

Visit the Affiliate Attribution Setup Guide for detailed code and instructions.