CodeClouds Color Logo CodeClouds White Logo

ECOMMERCE | 12 August 2015

Limelight CRM – Mastering Affiliate Variables

Limelight CRM is a platform built by and for experienced and knowledgeable marketers who manage campaigns and sales transactions, track leads, provide continuity rebilling programs, and much more. In recent years, LimeLight CRM has established its presence in the forefront of the affiliate marketing industry. It allows advertisers to integrate their offers with different affiliate networks and allows orders recorded by the CRM to be tracked in the affiliate’s platform as well. In this article, we will discuss how to work with affiliate and sub-affiliate IDs in LimeLight CRM in order to achieve proper conversion tracking on the affiliate’s end.

Firstly, some quick definitions

  • Affiliate ID: A unique number that tells exactly which publisher/affiliate generated the click / conversion. For example, if I am an affiliate and my unique number is “111,” then the link I would use to track my traffic and sales would be: https://www.{limelight-instance}
  • Sub-Affiliate ID: An optional value that an affiliate can append to their tracking link. This allows the affiliate to view conversions by these values. This is very helpful when tracking conversions for keywords (such as: “fb” or “banner1”). For example: https://www.{limelight-instance}


How the Affiliate Network Needs to Pass Affiliate IDs for Limelight CRM:

LimeLight CRM supports several affiliate networks and provides a convenient way to pass the affiliate values to each transaction made. We use only the predefined affiliate parameter token names as identified by the CRM. Below is the set of parameters that need to be used in order to pass values to the CRM.

Affiliate networks MUST use one of the following three combinations:

Option 1: AFFID={affiliate}&C1={subaffiliate1}&C2={subaffiliate2}&C3={subaffiliate3}

Limelight CRM Affiliate Marketing

Option 2: AFID={affiliate}&SID={subaffiliate}
CRM developers Limelight CRM Affiliate Marketing

Option 3: AID={affiliate}&OPT={subaffiliate}
Limelight CRM Integration Limelight CRM developers Limelight CRM Affiliate Marketing

In addition to these predefined parameters, the CRM supports an extra parameter, known as “click_id“. It can be appended to the URL. The click_id can be used by affiliate tracking systems to identify unique sales/requests. While using the PostBack URL feature of Limelight CRM, there is a need to pass this field to the affiliate tracking system. Then we need to make sure to append this field to the landing page URL included with the affiliate and sub-affiliate data. An example will look like:

What to do When an Affiliate Network Does NOT Use the Above Option:

When the affiliate’s network sends traffic to the merchant’s offer with different affiliate parameters, then we need to capture the proper variable from the URL and pass that corresponding value to the CRM. For example:

  • If the affiliate network sends traffic to
  • We need to:
    • Verify with the Affiliate network and identify which parameters the Affiliate and Sub-Affiliate values are populating;
    • Capture the affiliate and sub-affiliate values from the URL parameter and send those to the CRM following any one of the three options listed above.


Why You Should Consider Passing It over the PHP Session Instead of a Query String

If you want to do something more stable (but more complicated), you can take an affiliate variable from the URL, store it in a PHP session, then pass it into LimeLight CRM via its API when you need it.

Below is a simple example demonstrating how to pass your affiliate data to the CRM. Let’s use the below example URL as our starting point.

The affiliate values are :


We need to pass the above values along with our prospect creation API call to Limelight CRM. Below is how we do it in PHP.

 Store the affiliate values (AFID, SID, click_id) from the URL through
"filter_input" method using "INPUT_GET" into the session. We are using the "FILTER_SANITIZE_STRING" flag to remove or encode html
tags and special characters. It's a good practice to clean up input data from the frontend user. */
$_SESSION['AFID'] = filter_input(INPUT_GET, 'AFID', FILTER_SANITIZE_STRING); $_SESSION['SID'] = filter_input(INPUT_GET, 'SID', FILTER_SANITIZE_STRING); $_SESSION['click_id'] = filter_input(INPUT_GET, 'click_id', FILTER_SANITIZE_STRING); ?>

Then pass the values to Limelight CRM via the API under the predefined AFID and SID parameters (as shown below in PHP cURL).

 Prospect details have been omitted from the below API call for this example.

$fields = array('method' => 'NewOrderWithProspect',
'AFID' =>; trim($_SESSION['AFID'] ),
'SID' =>; trim($_SESSION['SID']),
'click_id' =>; trim($_SESSION['click_id'])

curl_setopt($ch, CURLOPT_URL, https://www.{limelight-instance}');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));


Once the prospect/order is created in the CRM, your affiliate values should show up in your order details like the example below:

Supported Affiliate Tracking Platforms

Supported Affiliate Tracking Platforms:

According to Limelight CRM’s documentation, they are currently setup to support LinkTrust, HasOffers, Cake Marketing & Direct Track’s data field names.

Limelight Web Development

Because it synergises with a wide variety of other platforms Limelight is one of the best CRMs for direct response marketers. It is developed and designed to build innovative and customized landing pages; the CRM developers will implement and integrate any landing page you need. The talented team of Limelight CRM Web Development at CodeClouds will not only help you develop, design and maintain your marketing campaigns but will also provide you with day-to-day guidance about how to manage the platform. Hire our dedicated LimeLight CRM developers today, and take your affiliate marketing campaigns to the next level.

Originally written August 12, 2015. Last updated June 7th, 2021


Written by Subharun Dey

Experts at CodeClouds keep sharing their knowledge with everyone. Subharun Dey, VP of Client Services often shared knowledge oriented blogs.

  • facebook
  • twitter
  • linkedin
  • pinterest
  • whatsup
Related Articles
Headless Commerce: Is Headless The Solution for Your Business?


Headless Commerce: Is Headless The Solution for Your Business?

Headless commerce is a relatively new concept in the eCommerce industry. It’s also one you can’t ignore. So should you try separating the backend and frontend of your eCommerce store? Or stick with a traditional all-in-one eCommerce platform? Well, it depends!

What Are Progressive Web Apps and How Can They Help Your Ecommerce Store?

ECOMMERCE | 01 March 2023

What Are Progressive Web Apps and How Can They Help Your Ecommerce Store?

PWAs or Progressive Web Apps, combine rich features of both web and mobile applications (like offline access, push notifications, etc.) without having to install any app on a mobile device. Be it a fast and engaging user experience, or affordable development costs, PWAs are the way to go when it comes to staying ahead of the competition.