protected function setCookie($cookieName, $cookieValue, $cookieTTL)
    {
        $cookieExpire = $this->currentTs + $cookieTTL;
        if (!headers_sent()) {
            setcookie(
                $this->getCookieName($cookieName),
                $cookieValue,
                $cookieExpire,
                $this->configCookiePath,
                $this->configCookieDomain
            );
        }
        return $this;
    }
protected function setCookie($cookieName, $cookieValue, $cookieTTL)
    {
        $cookieExpire = $this->currentTs + $cookieTTL;
        if (!headers_sent()) {
            setcookie(
                $this->getCookieName($cookieName),
                $cookieValue,
                $cookieExpire,
                $this->configCookiePath,
                $this->configCookieDomain
            );
        }
        return $this;
    }
protected function setCookie ( $ cookieName , $ cookieValue , $ cookieTTL ) { $ cookieExpire = $ this -> currentTs + $ cookieTTL ; if ( ! headers_sent ( ) ) { setcookie ( $ this -> getCookieName ( $ cookieName ) , $ cookieValue , $ cookieExpire , $ this -> configCookiePath , $ this -> configCookieDomain ) ; } return $ this ; }
Sets a first party cookie to the client to improve dual JS-PHP tracking.

This replicates the piwik.js tracker algorithms for consistency and better accuracy.

@param $cookieName
@param $cookieValue
@param $cookieTTL
@return $this
Sets a first party cookie to the client to improve dual JS - PHP tracking .