@Test public void setParamsTest() { product.setProductId("pdtID").setCategory4("cat4").setParams(); assertEquals(2, buffer.getVolatileParams().size()); assertEquals(0, buffer.getPersistentParams().size()); assertEquals(1, buffer.getVolatileParams().get("type").getValues().size()); assertEquals("pdt", buffer.getVolatileParams().get("type").getValues().get(0).execute()); assertEquals(1, buffer.getVolatileParams().get("pdtl").getValues().size()); assertEquals("cat4::pdtID", buffer.getVolatileParams().get("pdtl").getValues().get(0).execute()); }
@Override void setParams() { tracker.setParam(Hit.HitParam.HitType.stringValue(), "pdt"); if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.ProductList.stringValue(), buildProductName(), new ParamOption().setAppend(true).setEncode(true).setSeparator("|")); }
Product extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.HitType.stringValue(), "pdt"); if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.ProductList.stringValue(), buildProductName(), new ParamOption().setAppend(true).setEncode(true).setSeparator("|")); } }
Product extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.HitType.stringValue(), "pdt"); if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.ProductList.stringValue(), buildProductName(), new ParamOption().setAppend(true).setEncode(true).setSeparator("|")); } Product(Tracker tracker); }
Product extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.HitType.stringValue(), "pdt"); if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.ProductList.stringValue(), buildProductName(), new ParamOption().setAppend(true).setEncode(true).setSeparator("|")); } Product(Tracker tracker); Action getAction(); String getProductId(); String getCategory1(); String getCategory2(); String getCategory3(); String getCategory4(); String getCategory5(); String getCategory6(); int getQuantity(); double getUnitPriceTaxIncluded(); double getUnitPriceTaxFree(); double getDiscountTaxIncluded(); double getDiscountTaxFree(); String getPromotionalCode(); Product setAction(Action action); Product setProductId(String productId); Product setCategory1(String category1); Product setCategory2(String category2); Product setCategory3(String category3); Product setCategory4(String category4); Product setCategory5(String category5); Product setCategory6(String category6); Product setQuantity(int quantity); Product setUnitPriceTaxIncluded(double unitPriceTaxIncluded); Product setUnitPriceTaxFree(double unitPriceTaxFree); Product setDiscountTaxIncluded(double discountTaxIncluded); Product setDiscountTaxFree(double discountTaxFree); Product setPromotionalCode(String promotionalCode); CustomObjects CustomObjects(); void sendView(); }
Product extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.HitType.stringValue(), "pdt"); if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.ProductList.stringValue(), buildProductName(), new ParamOption().setAppend(true).setEncode(true).setSeparator("|")); } Product(Tracker tracker); Action getAction(); String getProductId(); String getCategory1(); String getCategory2(); String getCategory3(); String getCategory4(); String getCategory5(); String getCategory6(); int getQuantity(); double getUnitPriceTaxIncluded(); double getUnitPriceTaxFree(); double getDiscountTaxIncluded(); double getDiscountTaxFree(); String getPromotionalCode(); Product setAction(Action action); Product setProductId(String productId); Product setCategory1(String category1); Product setCategory2(String category2); Product setCategory3(String category3); Product setCategory4(String category4); Product setCategory5(String category5); Product setCategory6(String category6); Product setQuantity(int quantity); Product setUnitPriceTaxIncluded(double unitPriceTaxIncluded); Product setUnitPriceTaxFree(double unitPriceTaxFree); Product setDiscountTaxIncluded(double discountTaxIncluded); Product setDiscountTaxFree(double discountTaxFree); Product setPromotionalCode(String promotionalCode); CustomObjects CustomObjects(); void sendView();  }