Last updated 3 July 2015. Created on 3 July 2015.
Edited by deggertsen. Log in to edit this page.

Affiliate NG module for Drupal 7.x.
This is a new generation Affiliate module for Drupal 7.

Questions, problems, or issues? Please file a ticket here: https://www.drupal.org/project/issues/affiliate_ng

REQUIREMENTS

* Entity

INSTALLATION INSTRUCTIONS

1. Copy the files included in the tarball into a directory named "affiliate_ng" in your Drupal sites/all/modules/ directory or the location of contrib modules for your Drupal installation.
2. Login as site administrator.
3. Enable the Affiliate NG module on the Administer -> Modules page (Under the "Affiliate-NG" category).

For further configuration enabled the Affiliate NG UI Module

4. Enable the Affiliate UI module on the Administer -> Modules page (Under the "Affiliate-NG" category).

Operation

NOTE: By default, this module will not create tracking cookies in a browser. Affiliate clicks will only be tracked during the active browser session. Once the user navigates away from your site and closes their browser the affiliate information is gone. In order to track affiliate clicks or sales into the future beyond the current browser session (example: someone returning back to your site within 2 days to make a purchase) you must set a cookie time-to-live. This is done in the Affiliate UI module under "Affiliate Settings" (admin/affiliates/settings).

Links

1) example.com/ref/$affiliate_uid/$campaign_id
Which in practice looks like this: example.com/ref/1/2
The $affiliate_uid is the user id of the affiliate user.
The $campaign_id is optional, if left out, the click will be attributed to the "Default" campaign.

By default, the ref/ link will redirect to the homepage after registering the click. This can be changed by appending ?destination:
example.com/ref/1/2?destination=node/2 will make the link redirect to node/2.

2) example.com/node/2?a=$affiliate_uid&c=$campaign_id
Which in practice looks like this: example.com/node/2?a=1&c=2
As above, the campaign (&c=2) is optional.

The two different forms of affiliate links are completely interchangeable. A best practice is to use ref/ links when just pointing to the site, while using ?a links for pointing to specific pages.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.