protected function generateTrackingUrl($url, $trackingId)
    {
        $trackingUrl = ParserUtil::addUrlParam($url, $this->trackingIdName, $trackingId);
        
        // Pass the base URL if tracking script runs in dev or dev-stay mode.
        if($this->trackingJsMode == 'dev' || $this->trackingJsMode == 'dev-stay'){
            $trackingUrl = ParserUtil::addUrlParam($trackingUrl, 'cctapi', urlencode($this->baseUrl));
        }

        return $trackingUrl;
    }