protected function getUrlTrackEcommerce($grandTotal, $subTotal = 0.0, $tax = 0.0, $shipping = 0.0, $discount = 0.0)
    {
        if (!is_numeric($grandTotal)) {
            throw new Exception("You must specifiy a grandTotal for the Ecommerce order (or Cart update)");
        }

        $url = $this->getRequest($this->idSite);
        $url .= '&idgoal=0';
        if (!empty($grandTotal)) {
            $grandTotal = $this->forceDotAsSeparatorForDecimalPoint($grandTotal);
            $url .= '&revenue=' . $grandTotal;
        }
        if (!empty($subTotal)) {
            $subTotal = $this->forceDotAsSeparatorForDecimalPoint($subTotal);
            $url .= '&ec_st=' . $subTotal;
        }
        if (!empty($tax)) {
            $tax = $this->forceDotAsSeparatorForDecimalPoint($tax);
            $url .= '&ec_tx=' . $tax;
        }
        if (!empty($shipping)) {
            $shipping = $this->forceDotAsSeparatorForDecimalPoint($shipping);
            $url .= '&ec_sh=' . $shipping;
        }
        if (!empty($discount)) {
            $discount = $this->forceDotAsSeparatorForDecimalPoint($discount);
            $url .= '&ec_dt=' . $discount;
        }
        if (!empty($this->ecommerceItems)) {
            $url .= '&ec_items=' . urlencode(json_encode($this->ecommerceItems));
        }
        $this->ecommerceItems = array();

        return $url;
    }
protected function getUrlTrackEcommerce($grandTotal, $subTotal = 0.0, $tax = 0.0, $shipping = 0.0, $discount = 0.0)
    {
        if (!is_numeric($grandTotal)) {
            throw new Exception("You must specifiy a grandTotal for the Ecommerce order (or Cart update)");
        }

        $url = $this->getRequest($this->idSite);
        $url .= '&idgoal=0';
        if (!empty($grandTotal)) {
            $grandTotal = $this->forceDotAsSeparatorForDecimalPoint($grandTotal);
            $url .= '&revenue=' . $grandTotal;
        }
        if (!empty($subTotal)) {
            $subTotal = $this->forceDotAsSeparatorForDecimalPoint($subTotal);
            $url .= '&ec_st=' . $subTotal;
        }
        if (!empty($tax)) {
            $tax = $this->forceDotAsSeparatorForDecimalPoint($tax);
            $url .= '&ec_tx=' . $tax;
        }
        if (!empty($shipping)) {
            $shipping = $this->forceDotAsSeparatorForDecimalPoint($shipping);
            $url .= '&ec_sh=' . $shipping;
        }
        if (!empty($discount)) {
            $discount = $this->forceDotAsSeparatorForDecimalPoint($discount);
            $url .= '&ec_dt=' . $discount;
        }
        if (!empty($this->ecommerceItems)) {
            $url .= '&ec_items=' . urlencode(json_encode($this->ecommerceItems));
        }
        $this->ecommerceItems = array();

        return $url;
    }
protected function getUrlTrackEcommerce ( $ grandTotal , $ subTotal = 0.0 , $ tax = 0.0 , $ shipping = 0.0 , $ discount = 0.0 ) { if ( ! is_numeric ( $ grandTotal ) ) { throw new Exception ( "You must specifiy a grandTotal for the Ecommerce order (or Cart update)" ) ; } $ url = $ this -> getRequest ( $ this -> idSite ) ; $ url .= '&idgoal=0' ; if ( ! empty ( $ grandTotal ) ) { $ grandTotal = $ this -> forceDotAsSeparatorForDecimalPoint ( $ grandTotal ) ; $ url .= '&revenue=' . $ grandTotal ; } if ( ! empty ( $ subTotal ) ) { $ subTotal = $ this -> forceDotAsSeparatorForDecimalPoint ( $ subTotal ) ; $ url .= '&ec_st=' . $ subTotal ; } if ( ! empty ( $ tax ) ) { $ tax = $ this -> forceDotAsSeparatorForDecimalPoint ( $ tax ) ; $ url .= '&ec_tx=' . $ tax ; } if ( ! empty ( $ shipping ) ) { $ shipping = $ this -> forceDotAsSeparatorForDecimalPoint ( $ shipping ) ; $ url .= '&ec_sh=' . $ shipping ; } if ( ! empty ( $ discount ) ) { $ discount = $ this -> forceDotAsSeparatorForDecimalPoint ( $ discount ) ; $ url .= '&ec_dt=' . $ discount ; } if ( ! empty ( $ this -> ecommerceItems ) ) { $ url .= '&ec_items=' . urlencode ( json_encode ( $ this -> ecommerceItems ) ) ; } $ this -> ecommerceItems = array ( ) ; return $ url ; }
Returns URL used to track Ecommerce orders

Calling this function will reinitializes the property ecommerceItems to empty array
so items will have to be added again via addEcommerceItem()

@ignore
Returns URL used to track Ecommerce orders