Class ReportHelper


  • public final class ReportHelper
    extends java.lang.Object
    Marketing Report Helper
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> calcConversionRates​(java.util.List<GenericValue> visits, java.util.List<GenericValue> orders, java.lang.String keyFieldName)
      Calculate conversion rates based on a List of visits and orders.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • calcConversionRates

        public static java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> calcConversionRates​(java.util.List<GenericValue> visits,
                                                                                                                 java.util.List<GenericValue> orders,
                                                                                                                 java.lang.String keyFieldName)
        Calculate conversion rates based on a List of visits and orders. Designed to be used for reporting on tracking code or marketing campaigns
        Parameters:
        visits -
        orders -
        keyFieldName - - name of key field for visits and orders Lists, ie "trackingCodeId" or "marketingCampaignId"
        Returns:
        a List of Maps with keys (${keyFieldName}, visits - # visits, orders - # orders, orderAmount - total amount of orders, conversionRate - # orders/# visits