src/FACTFinder/Adapter/Tracking.php
public function setupCartTracking(
        $id,
        $masterId = null,
        $title = '',
        $query = null,
        $sid = null,
        $cookieId = null,
        $count = 1,
        $price = null,
        $userId = null,
        $campaign = null,
        $instoreAds = false
    ) {
        if (strlen($sid) == 0) $sid = session_id();
        $params = array(
            'id'        => $id,
            'title'     => $title,
            'sid'       => $sid,
            'count'     => $count,
            'event'     => 'cart'
        );

        if (strlen($price) > 0) $params['price'] = $price;
        if (strlen($userId) > 0) $params['userId'] = $userId;
        if (strlen($cookieId) > 0) $params['cookieId'] = $cookieId;
        if (strlen($masterId) > 0) $params['masterId'] = $masterId;
        if (strlen($query) > 0) $params['query'] = $query;
        if (strlen($campaign) > 0) $params['campaign'] = $campaign;
        if ($instoreAds) $params['instoreAds'] = 'true';
        
        $this->parameters->clear();
        $this->parameters->setAll($params);
    }
public function setupCartTracking(
        $id,
        $masterId = null,
        $title = '',
        $query = null,
        $sid = null,
        $cookieId = null,
        $count = 1,
        $price = null,
        $userId = null,
        $campaign = null,
        $instoreAds = false
    ) {
        if (strlen($sid) == 0) $sid = session_id();
        $params = array(
            'id'        => $id,
            'title'     => $title,
            'sid'       => $sid,
            'count'     => $count,
            'event'     => 'cart'
        );

        if (strlen($price) > 0) $params['price'] = $price;
        if (strlen($userId) > 0) $params['userId'] = $userId;
        if (strlen($cookieId) > 0) $params['cookieId'] = $cookieId;
        if (strlen($masterId) > 0) $params['masterId'] = $masterId;
        if (strlen($query) > 0) $params['query'] = $query;
        if (strlen($campaign) > 0) $params['campaign'] = $campaign;
        if ($instoreAds) $params['instoreAds'] = 'true';
        
        $this->parameters->clear();
        $this->parameters->setAll($params);
    }
Use this method directly if you want to separate the setup from sending
the request. This is particularly useful when using the
MultiCurlRequestFactory.