Class TrackingCodeEvents
java.lang.Object
org.apache.ofbiz.marketing.tracking.TrackingCodeEvents
Events used for maintaining TrackingCode related information
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkAccessTrackingCode
(HttpServletRequest request, HttpServletResponse response) static String
checkPartnerTrackingCodeUrlParam
(HttpServletRequest request, HttpServletResponse response) If TrackingCode monitoring is desired this event should be added to the list of events that run on every request.static String
checkTrackingCodeCookies
(HttpServletRequest request, 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 String
checkTrackingCodeUrlParam
(HttpServletRequest request, HttpServletResponse response) If TrackingCode monitoring is desired this event should be added to the list of events that run on every request.static List<GenericValue>
makeTrackingCodeOrders
(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 String
processTrackingCode
(GenericValue trackingCode, HttpServletRequest request, HttpServletResponse response, String sourceEnumId) static String
removeAccesTrackingCodeCookie
(HttpServletRequest request, HttpServletResponse response) Removes the ACCESS tracking code cookie
-
Constructor Details
-
TrackingCodeEvents
public TrackingCodeEvents()
-
-
Method Details
-
checkTrackingCodeUrlParam
public static String checkTrackingCodeUrlParam(HttpServletRequest request, 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 String checkPartnerTrackingCodeUrlParam(HttpServletRequest request, 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 a
dtc
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 String processTrackingCode(GenericValue trackingCode, HttpServletRequest request, HttpServletResponse response, String sourceEnumId) -
checkTrackingCodeCookies
public static String checkTrackingCodeCookies(HttpServletRequest request, 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 String checkAccessTrackingCode(HttpServletRequest request, HttpServletResponse response) -
removeAccesTrackingCodeCookie
public static String removeAccesTrackingCodeCookie(HttpServletRequest request, HttpServletResponse response) Removes the ACCESS tracking code cookie -
makeTrackingCodeOrders
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
-