return new SearchAction( createHost( event ) + "/action/search/" + actionId, event.getInfo().getSearchQuery() );
}
private Action createEcommerceAction( TrackingEvent event ) {
Order order = ( Order )event.getDetail();
EcommerceAction action = new EcommerceAction( createHost( event ) + "/action/ecommerce/" + order.getOrderId(),
order.getOrderId(),
order.getTotal() );
action.setTax( order.getTax() );
action.setShipping( order.getShipping() );
if( !order.getItems().isEmpty() ) {
action.setItems( getOrderItems( order.getItems() ) );
}
return action;
}