Class TrackingCodeEvents
- java.lang.Object
-
- org.apache.ofbiz.marketing.tracking.TrackingCodeEvents
-
public class TrackingCodeEvents extends java.lang.Object
Events used for maintaining TrackingCode related information
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description TrackingCodeEvents()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
checkAccessTrackingCode(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static java.lang.String
checkPartnerTrackingCodeUrlParam(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If TrackingCode monitoring is desired this event should be added to the list of events that run on every request.static java.lang.String
checkTrackingCodeCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If attaching TrackingCode Cookies to the visit is desired this event should be added to the list of events that run on the first hit in a visit.static java.lang.String
checkTrackingCodeUrlParam(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If TrackingCode monitoring is desired this event should be added to the list of events that run on every request.static java.util.List<GenericValue>
makeTrackingCodeOrders(javax.servlet.http.HttpServletRequest request)
Makes a list of TrackingCodeOrder entities to be attached to the current order; called by the createOrder event; the values in the returned List will not have the orderId setstatic java.lang.String
processTrackingCode(GenericValue trackingCode, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String sourceEnumId)
static java.lang.String
removeAccesTrackingCodeCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Removes the ACCESS tracking code cookie
-
-
-
Method Detail
-
checkTrackingCodeUrlParam
public static java.lang.String checkTrackingCodeUrlParam(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If TrackingCode monitoring is desired this event should be added to the list of events that run on every request. This event looks for the parameterautoTrackingCode
or a shortened version:atc
.
-
checkPartnerTrackingCodeUrlParam
public static java.lang.String checkPartnerTrackingCodeUrlParam(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If TrackingCode monitoring is desired this event should be added to the list of events that run on every request. This event looks for the parameterptc
and handles the value as a Partner Managed Tracking Code. If the specified trackingCodeId exists then it is used as is, otherwise a new one is created with the ptc value as the trackingCodeId. The values for the fields of the new TrackingCode can come from one of two places: if adtc
parameter is included the value will be used to lookup a TrackingCode with default values, otherwise the default trackingCodeId will be looked up in thepartner.trackingCodeId.default
in thegeneral.properties
file. If that is still not found just use an empty TrackingCode.
-
processTrackingCode
public static java.lang.String processTrackingCode(GenericValue trackingCode, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String sourceEnumId)
-
checkTrackingCodeCookies
public static java.lang.String checkTrackingCodeCookies(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
If attaching TrackingCode Cookies to the visit is desired this event should be added to the list of events that run on the first hit in a visit.
-
checkAccessTrackingCode
public static java.lang.String checkAccessTrackingCode(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
removeAccesTrackingCodeCookie
public static java.lang.String removeAccesTrackingCodeCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Removes the ACCESS tracking code cookie
-
makeTrackingCodeOrders
public static java.util.List<GenericValue> makeTrackingCodeOrders(javax.servlet.http.HttpServletRequest request)
Makes a list of TrackingCodeOrder entities to be attached to the current order; called by the createOrder event; the values in the returned List will not have the orderId set
-
-