Drupal is a registered trademark of Dries Buytaert

affiliated

9 sites Security covered
View on drupal.org

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
2 months ago
Release cadence
80 days
Stability
0% stable

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