PHPackages                             affilify/module-tracking - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. affilify/module-tracking

ActiveMagento2-module

affilify/module-tracking
========================

Magento 2 module for affiliate conversion tracking via Affilify API

1.1.0(3mo ago)082—0%MITPHPPHP &gt;=7.4

Since Dec 10Pushed 3mo agoCompare

[ Source](https://github.com/blhack-it/affilify-magento)[ Packagist](https://packagist.org/packages/affilify/module-tracking)[ Docs](https://github.com/blhack-it/affilify-magento)[ RSS](/packages/affilify-module-tracking/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Affilify Tracking Module for Magento 2
======================================

[](#affilify-tracking-module-for-magento-2)

A Magento 2 module for affiliate conversion tracking that integrates with the Affilify platform.

Features
--------

[](#features)

- **Click Tracking**: Captures affiliate IDs from URL parameters and stores them in cookies
- **Conversion Tracking**: Automatically tracks conversions on checkout success
- **Async Processing**: Uses MySQL message queues for non-blocking API calls
- **Multi-Store Support**: Configurable per store view
- **GDPR Compliant**: IP addresses are masked before sending to tracking API
- **Retry Logic**: Automatic retry with exponential backoff for failed API calls
- **Debug Mode**: Verbose logging for troubleshooting

Requirements
------------

[](#requirements)

- Magento 2.4.0 or higher
- PHP 7.4 or higher

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require affilify/module-tracking
bin/magento module:enable Affilify_Tracking
bin/magento setup:upgrade
bin/magento cache:clean
```

### Manual Installation

[](#manual-installation)

1. Create directory: `app/code/Affilify/Tracking`
2. Download and extract the module files to the directory
3. Run:

```
bin/magento module:enable Affilify_Tracking
bin/magento setup:upgrade
bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

Navigate to **Stores &gt; Configuration &gt; Affilify &gt; Conversion Tracking**

### General Settings

[](#general-settings)

SettingDescriptionDefaultEnable TrackingEnable/disable the moduleYesAPI KeyYour Affilify API Key (from Advertiser &gt; API tab)-API URLTracking API URLURL Parameter NameThe URL parameter to captureaffilify\_idCookie DurationDays to keep the tracking cookie30Debug ModeEnable verbose loggingNoHow It Works
------------

[](#how-it-works)

### Click Tracking

[](#click-tracking)

1. A visitor arrives with an affiliate link: `https://yourstore.com/?affilify_id=abc123`
2. The module captures the `affilify_id` parameter
3. The value is validated (alphanumeric, dash, underscore only, max 100 chars)
4. A cookie is set with the affiliate ID
5. Click data is sent to the Affilify API

### Conversion Tracking

[](#conversion-tracking)

1. Customer completes checkout
2. The `checkout_onepage_controller_success_action` event fires
3. If a tracking cookie exists, conversion data is captured
4. Conversion is sent to the Affilify API with order details
5. The tracking cookie is deleted (single conversion per click)

Message Queue
-------------

[](#message-queue)

The module uses MySQL message queues for async processing:

- **Topic**: `affilify.tracking.click` - Click events
- **Topic**: `affilify.tracking.conversion` - Conversion events

### Running Queue Consumers

[](#running-queue-consumers)

Magento's cron automatically processes queue consumers. Make sure cron is running:

```
# Verify cron is configured
bin/magento cron:run
```

For manual testing or dedicated consumer processes:

```
# Run click consumer manually
bin/magento queue:consumers:start affilify.tracking.click

# Run conversion consumer manually
bin/magento queue:consumers:start affilify.tracking.conversion
```

Logs
----

[](#logs)

Debug logs are written to: `var/log/affilify_tracking.log`

Support
-------

[](#support)

- Issues:
- Documentation:

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

3

Last Release

96d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b65d139336764e95e246a91c143cdaed4fa8c376eb5319bedec97572e63cd02b?d=identicon)[e.barban@underdogsgroup.it](/maintainers/e.barban@underdogsgroup.it)

---

Top Contributors

[![McRipper](https://avatars.githubusercontent.com/u/58031?v=4)](https://github.com/McRipper "McRipper (13 commits)")[![ghillahill](https://avatars.githubusercontent.com/u/66118879?v=4)](https://github.com/ghillahill "ghillahill (3 commits)")

---

Tags

trackingconversionmagento2affiliateaffilify

### Embed Badge

![Health badge](/badges/affilify-module-tracking/health.svg)

```
[![Health](https://phpackages.com/badges/affilify-module-tracking/health.svg)](https://phpackages.com/packages/affilify-module-tracking)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

119.1k](/packages/opengento-module-category-import-export)[mage-os/module-admin-activity-log

The Admin Activity extension makes it easy to track all admin activity with comprehensive audit logging.

261.4k](/packages/mage-os-module-admin-activity-log)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
