public function setCustom($dimension, $value = null)
    {
        if ($value === null && is_array($dimension)) {
            $params = json_encode($dimension);
            $trackingCode = "ga('set', $params);";
        } else {
            $trackingCode = "ga('set', '$dimension', '$value');";
        }

        $this->trackCustom($trackingCode);

        return $this;
    }
public function setCustom($dimension, $value = null)
    {
        if ($value === null && is_array($dimension)) {
            $params = json_encode($dimension);
            $trackingCode = "ga('set', $params);";
        } else {
            $trackingCode = "ga('set', '$dimension', '$value');";
        }

        $this->trackCustom($trackingCode);

        return $this;
    }
public function setCustom ( $ dimension , $ value = null ) { if ( $ value === null && is_array ( $ dimension ) ) { $ params = json_encode ( $ dimension ) ; $ trackingCode = "ga('set', $params);" ; } else { $ trackingCode = "ga('set', '$dimension', '$value');" ; } $ this -> trackCustom ( $ trackingCode ) ; return $ this ; }
sets custom dimensions

@param string|array $dimension
@param null|string $value
@return AnalyticsProviderInterface
sets custom dimensions