Class TrackingCodeEvents

java.lang.Object
org.apache.ofbiz.marketing.tracking.TrackingCodeEvents

public class TrackingCodeEvents extends Object
Events used for maintaining TrackingCode related information
  • 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 parameter autoTrackingCode 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 parameter ptc 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 the partner.trackingCodeId.default in the general.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

      public 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 set