Affiliate Module Configuration
For a customer to become associated to an affiliate, they must enter your site using a URL that includes one of the affiliate's tracking codes as a request parameter. This tracking code is then gathered from the URL, added to the customer's order, and recorded in an audit table (BLC_ORDER_TRACKING_HISTORY
).
The Affiliate module features four main customizations:
The Attribution Model system property (
tracking.code.url.param
) specifies the string that is used to identify tracking code parameters in the url. For instance, iftracking.code.url.param=tc
, then to use a tracking code, a customer would have to visitmyCompany.com/?tc=trackingCode
.The Attribution Model system property (
tracking.code.attribution.model
) determines which tracking code is applied to an order in the case of multiple tracking codes. There are two options: First-Touch and Last-Touch. First-Touch (FIFO) indicates that the first tracking code applied to an order should remain on that order through completion. Last-Touch (LIFO) indicates that each new tracking code should replace the previous code applied to the order until completion.The Apply to Subsequent Orders property of a tracking code (
trackingCode.getApplyToSubsequentOrders()
) determines whether or not a tracking code will be applied to subqequent orders following the completion of the code's initial order. If this flag is false, that tracking code will be "forgotten" after completion of the initial order. However, that code can be used again if it is added through the URL to a subsequent order.The Persist Between Visits property of a tracking code (
trackingCode.getPersistBetweenVisits()
) determines whether or not a cookie containing the tracking code is created at the time the code is read from the URL.
Optional Configurations
To add logging for this module, you must include the following
log4j
configuration to your project insite/src/main/webapp/WEB-INF/log4j.xml
and/oradmin/src/main/webapp/WEB-INF/log4j.xml
:<logger name="com.broadleafcommerce.affiliate"> <level value="info" /> </logger>