Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Affiliated

9 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.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
May 2025
Latest release
8 months ago
Releases (12 mo)
3 ▲ from 1
Maintenance
Slowing

Release Timeline

Releases

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