Skip to content
Affiliate Marketing — Explained with Examples

Affiliate Marketing — Explained with Examples

DodaTech Updated Jun 15, 2026 7 min read

Affiliate marketing is a performance-based marketing model where businesses pay external partners (affiliates) a commission for driving desired actions such as sales, leads, or clicks through unique tracking links.

Why Affiliate Marketing Matters

Affiliate marketing is a $17+ billion industry that drives 15-30% of all e-commerce sales. It’s performance-based — you only pay when results happen, making it one of the lowest-risk marketing channels. DodaTech’s affiliate program drives 12% of Doda Browser and DodaZIP downloads, paying affiliates 20% commission on each sale they generate. For publishers, it’s a way to monetize content without creating products.

How Affiliate Marketing Works

Think of affiliate marketing like a real estate agent. The agent (affiliate) shows potential buyers (traffic) a house (product). When a buyer purchases, the agent gets a commission. The seller (merchant) only pays when the sale closes.

    graph LR
    A[Merchant<br/>Product creator] --> B[Affiliate Network<br/>Platform connecting both]
    B --> C[Affiliate<br/>Content creator]
    C --> D[Audience<br/>Readers / followers]
    D -->|Click affiliate link| E[Merchant's Site]
    E -->|Cookie set| D
    E -->|Sale completes| F[Commission<br/>Paid to affiliate]
    F --> C
    style Affiliate fill:#f59e0b,color:#fff
  

Commission Structures

CPA (Cost Per Action)

Affiliate earns commission when a user completes a specific action — filling out a form, signing up for a trial, or requesting a quote.

Best for: Lead generation, SaaS free trials, newsletter signups.

CPC (Cost Per Click)

Affiliate earns commission for each click sent to the merchant’s site, regardless of whether the user converts.

Best for: High-traffic content sites, comparison engines.

CPS (Cost Per Sale)

Affiliate earns a percentage of the sale value — the most common model.

Best for: E-commerce, digital products, software.

Commission TypePayout TriggerTypical RateRisk Level
CPA (per action)Form fill, signup$2-50 per leadLow for merchant
CPC (per click)Click on link$0.10-0.50 per clickMedium for merchant
CPS (per sale)Completed purchase5-30% of saleLowest for merchant
HybridMultiple triggersVariesBalanced
# affiliate_calculator.py
def calculate_affiliate_earnings(model, visitors, conversion_rate,
                                 commission_value):
    """
    Calculate earnings for different affiliate models.
    """

    if model == "cps":
        conversions = visitors * conversion_rate
        total = conversions * commission_value
        print(f"CPS Model ({(conversion_rate*100):.1f}% conversion, "
              f"${commission_value:.2f}/sale):")
        print(f"  {visitors:,} visitors → {conversions:.0f} sales → "
              f"${total:,.2f}")

    elif model == "cpa":
        conversions = visitors * conversion_rate
        total = conversions * commission_value
        print(f"CPA Model ({(conversion_rate*100):.1f}% conversion, "
              f"${commission_value:.2f}/lead):")
        print(f"  {visitors:,} visitors → {conversions:.0f} leads → "
              f"${total:,.2f}")

    elif model == "cpc":
        ctr = conversion_rate
        total = visitors * ctr * commission_value
        print(f"CPC Model ({ctr:.1f}% CTR, "
              f"${commission_value:.2f}/click):")
        print(f"  {visitors:,} visitors → "
              f"{visitors * ctr:.0f} clicks → ${total:,.2f}")

    return total

# Compare models for 50,000 monthly visitors
calculate_affiliate_earnings("cps", 50000, 0.03, 15.00)
calculate_affiliate_earnings("cpa", 50000, 0.05, 5.00)
calculate_affiliate_earnings("cpc", 50000, 0.04, 0.25)

Expected output:

CPS Model (3.0% conversion, $15.00/sale):
  50,000 visitors → 1500 sales → $22,500.00
CPA Model (5.0% conversion, $5.00/lead):
  50,000 visitors → 2500 leads → $12,500.00
CPC Model (4.0% CTR, $0.25/click):
  50,000 visitors → 2000 clicks → $500.00

Affiliate Networks — The Marketplace

Networks connect merchants with affiliates and handle tracking, payments, and fraud detection.

NetworkBest ForCommission RangePayout Threshold
Amazon AssociatesPhysical products, beginners1-10%$10 (gift card)
ShareASaleDigital products, mid-tier5-30%$50
CJ (Commission Junction)Enterprise, large brands2-20%$50
ClickBankDigital info products50-75%$100
ImpactEnterprise, advanced trackingNegotiable$100
PartnerStackSaaS, recurring commissions20-30%$100

Tracking Links and Cookies

Affiliate links contain a unique identifier so merchants know which affiliate sent the traffic.

<!-- Direct affiliate link -->
<a href="https://dodatech.com/download?ref=affiliate123&utm_source=blog"
   target="_blank" rel="nofollow sponsored">
  Download Doda Browser
</a>

<!-- Cloaked link (using redirect) -->
<a href="https://go.dodatech.com/affiliate123"
   target="_blank" rel="nofollow sponsored">
  Get Doda Browser Free
</a>

Cookie Duration

The cookie stores the affiliate’s ID in the user’s browser. If the user purchases within the cookie window, the affiliate gets credit.

Cookie DurationCommon ForExample
24 hoursLow-consideration productsDaily deals
7-30 daysStandard e-commerceAmazon (24h)
60-90 daysHigher-consideration productsSoftware, travel
LifetimeSubscription servicesSaaS platforms
// Affiliate cookie example (simplified)
function setAffiliateCookie(affiliateId, days) {
  const expires = new Date();
  expires.setTime(expires.getTime() + days * 24 * 60 * 60 * 1000);
  document.cookie = `affiliate_id=${affiliateId};expires=${expires.toUTCString()};path=/`;
  console.log(`Affiliate cookie set: ${affiliateId} (${days} days)`);
}

function getAffiliateCookie() {
  const match = document.cookie.match(/(?:^|; )affiliate_id=([^;]*)/);
  return match ? match[1] : null;
}

// When someone clicks an affiliate link
document.querySelectorAll('.affiliate-link').forEach(link => {
  link.addEventListener('click', function(e) {
    const affiliateId = this.dataset.affiliateId;
    if (affiliateId) {
      setAffiliateCookie(affiliateId, 30);
      console.log('Affiliate cookie set from click');
    }
  });
});

FTC Disclosure Requirements

The FTC requires affiliates to clearly disclose their affiliate relationships. Failure to do so can result in fines up to $43,792 per violation.

Disclosure Best Practices

<!-- Good disclosure — clear, prominent, before the link -->
<p>
  <strong>Disclosure:</strong> Some links on this page are affiliate links.
  If you purchase through them, DodaTech earns a commission at no extra cost to you.
  <a href="/affiliate-policy" target="_blank">Learn more</a>.
</p>

<!-- Affiliate link with proper rel attribute -->
<a href="https://dodatech.com/download?ref=tutorial123"
   rel="nofollow sponsored"
   class="affiliate-link">
  Download Doda Browser
</a>

Disclosure rules:

  • Clear and conspicuous: Not hidden in fine print or buried at page bottom
  • Place before the affiliate link: Users see it before clicking
  • Plain language: “We earn a commission” not “We participate in affiliate programs”
  • On every page with affiliate links, not just the homepage
  • Verbal disclosure in videos: Don’t rely solely on the description box

Building an Affiliate Program

Merchant Side (Running a Program)

# affiliate_program_setup.py
class AffiliateProgram:
    def __init__(self, name, commission_rate, cookie_days):
        self.name = name
        self.commission_rate = commission_rate
        self.cookie_days = cookie_days
        self.affiliates = {}
        self.sales = []

    def register_affiliate(self, affiliate_id, name, email):
        self.affiliates[affiliate_id] = {
            'name': name,
            'email': email,
            'clicks': 0,
            'conversions': 0,
            'revenue': 0.0
        }
        print(f"Affiliate registered: {name} (ID: {affiliate_id})")

    def track_conversion(self, affiliate_id, order_value):
        if affiliate_id not in self.affiliates:
            print(f"Unknown affiliate: {affiliate_id}")
            return

        commission = order_value * self.commission_rate
        self.affiliates[affiliate_id]['conversions'] += 1
        self.affiliates[affiliate_id]['revenue'] += commission
        self.sales.append({
            'affiliate': affiliate_id,
            'order': order_value,
            'commission': commission
        })
        print(f"Commission earned: ${commission:.2f} for {affiliate_id}")

    def generate_report(self):
        print(f"\n=== {self.name} Affiliate Report ===")
        print(f"{'Affiliate':<15} {'Sales':<8} "
              f"{'Revenue':<10} {'Commission':<10}")
        print("-" * 43)
        for aid, data in self.affiliates.items():
            print(f"{data['name']:<15} {data['conversions']:<8} "
                  f"${data['revenue']:<8.2f} "
                  f"${data['revenue'] * self.commission_rate:<8.2f}")

# Example: DodaTech's affiliate program
program = AffiliateProgram("DodaTech Tools", 0.20, 30)
program.register_affiliate("A001", "TechBlogger", "tech@blog.com")
program.register_affiliate("A002", "DevTuber", "dev@youtube.com")
program.track_conversion("A001", 45.00)
program.track_conversion("A002", 45.00)
program.track_conversion("A001", 89.00)
program.generate_report()

Expected output:

Affiliate registered: TechBlogger (ID: A001)
Affiliate registered: DevTuber (ID: A002)
Commission earned: $9.00 for A001
Commission earned: $9.00 for A002
Commission earned: $17.80 for A001

=== DodaTech Tools Affiliate Report ===
Affiliate       Sales    Revenue    Commission
-----------------------------------------------
TechBlogger     2        $26.80     $5.36
DevTuber        1        $9.00      $1.80

Common Mistakes

  1. Not disclosing affiliate relationships: The FTC fines up to $43,792 per violation. Always place clear, prominent disclosures before affiliate links.

  2. Promoting products you haven’t used: Your audience trusts you. Promoting a low-quality product damages that trust permanently.

  3. Relying on a single affiliate network: If Amazon Associates bans your account (common), you lose all income. Diversify across networks.

  4. Ignoring cookie duration: A 24-hour cookie (Amazon) means you must convert users quickly. Longer cookies (60-90 days) are better for high-consideration products.

  5. Not tracking link performance: Without UTM parameters and link tracking, you can’t know which content drives the most affiliate revenue.

Practice Questions

  1. What is the difference between CPA, CPC, and CPS commission models?
  2. Why is FTC disclosure required for affiliate marketing?
  3. What does an affiliate cookie do?
  4. What is the main advantage of affiliate marketing for merchants?
  5. Why should affiliates diversify their programs?

Answers:

  1. CPA pays per action (form fill, signup). CPC pays per click. CPS pays per sale. CPS is most common for e-commerce.
  2. The FTC requires disclosure so consumers know the publisher may earn a commission. It’s consumer protection law, not optional.
  3. An affiliate cookie stores the affiliate’s ID in the user’s browser for a set duration. If the user purchases within that window, the affiliate gets credit.
  4. It’s performance-based — you only pay for results. No upfront costs, no ad spend waste. Risk is extremely low compared to paid advertising.
  5. If one program changes terms, reduces commissions, or bans you, you lose that income. Multiple programs protect your earnings.

Mini Project: Start an Affiliate Program

  1. Sign up for an affiliate network (ShareASale or Impact for merchants; Amazon Associates for beginners)
  2. Create 3 pieces of content with affiliate links (blog post, YouTube video, social media post)
  3. Add proper FTC disclosures to each piece
  4. Set up UTM tracking: ?utm_source=affiliate&utm_medium=blog&utm_campaign=product-launch
  5. Track clicks with Google Analytics (affiliate link clicks as events)
  6. Track conversions over 30 days
  7. Calculate EPC (Earnings Per Click) and identify top-performing content
  8. Scale what works, cut what doesn’t

This mirrors how DodaTech’s affiliate program drives 12% of tool downloads through content creator partnerships.

Related topics: Google Analytics, Content Marketing, SEO, Email Marketing, Social Media Marketing

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro