Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Affiliated

15 sites Security covered
View on drupal.org

This project provides a framework for tracking affiliate referrals and conversions in Drupal. It logs clicks, manages affiliate cookies, and allows you to define and track various conversion events like e-commerce orders or form submissions, with submodules for common scenarios.

Affiliate Tracking Framework for Drupal 10.3+

Affiliated provides the core infrastructure for tracking affiliate referrals and conversions in Drupal. It works out of the box for basic affiliate tracking, but the real power comes from extending it with your own business logic.

Use the included submodules for simple implementations, or build custom conversion types, reporting, and commission rules tailored to your specific needs. The aim of this project is to provide the hooks, events, and entity structure to build your own affiliate tracking system based on your specific needs.

This was originally based off the work done in affiliate_ng (Drupal 7), rebuilt for modern Drupal with improved architecture and extensibility.

What's Included

  • Click Tracking – Automatically detects affiliate links (?affiliate=CODE), manages cookies, and logs clicks
  • Conversion Entity System – Bundled entity type for tracking any conversion event you define
  • Campaign Management – Affiliates can organize links into campaigns to track which efforts perform best
  • Affiliate Dashboard – Each affiliate gets a dashboard at /user/UID/affiliate for link generation and statistics
  • Ready-to-Use Submodules – Track Commerce orders, user registrations, and webform submissions

How It Works

  1. Click – Visitor arrives via an affiliate link (yoursite.com?affiliate=john123)
  2. Cookie – Affiliate ID is stored in the visitor's browser
  3. Action – Visitor completes a trackable action (purchase, registration, form submission)
  4. Conversion – If an affiliate cookie is found on the device, a conversion entity is created and attributed to the affiliate account

Included Submodules

  • affiliate_commerce – Track Drupal Commerce order conversions
  • affiliate_registrations – Track new user registration conversions
  • affiliate_webform – Track webform submission conversions

For production sites, you'll likely want to extend this basic functionality or create custom conversion types that include your commission rules, validation logic, and business-specific requirements.

Extending the module

The framework is designed to be extended. Most implementations will add:

  • Custom conversion types with specific commission calculations and validation
  • Detailed reporting Views for affiliates and administrators
  • Payout tracking and management workflows
  • Custom notification systems and affiliate communications
  • Integration with your specific business processes

There is extensive documentation in the README file. Refer to this for examples of implementing custom conversion types, using hooks, and responding to events. I will keep this file updated as new features and API improvements are added.

Quick Start

  1. Install the module like normal: composer require drupal/affiliated and drush en affiliated
  2. Configure settings at /admin/config/affiliate/settings
  3. Grant users that you want to be affiliates the "act as an affiliate" permission at a minimum, if you want them to view reporting you will also want to grat view access to the clicks, conversions, campaigns, etc.
  4. Enable the submodules you need (or create custom conversion types at /admin/structure/affiliate/conversion/types)
  5. Affiliates can access their dashboard at /user/UID/affiliate

Development Status

Alpha stage: The module is functional and personally being used in production, but expect API changes before a stable 1.0.

Support & Contributing

Report bugs, request features, or submit patches in the issue queue. If you find this useful please chime in and let me know in the issue queue and on the #affiliated slack channel.

Activity

Total releases
4
First release
May 2025
Latest release
6 months ago
Releases (12 mo)
3 ▲ from 1
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
1.0.0-alpha3 Pre-release Dec 31, 2025
1.0.0-alpha2 Pre-release Dec 15, 2025
1.0.0-alpha1 Pre-release Oct 10, 2025
1.0.x-dev Dev May 5, 2025