Class ReportHelper

java.lang.Object
org.apache.ofbiz.marketing.report.ReportHelper

public final class ReportHelper extends Object
Marketing Report Helper
  • Method Details

    • calcConversionRates

      public static List<Map<String,Object>> calcConversionRates(List<GenericValue> visits, List<GenericValue> orders, 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